When passing in a team number to TeamRequest.getTeam(), the method .getJson() is called on the API response, which will cause a NullPointerException if the team number does not exist. The same result will happen if an invalid event code is provided, or any other similar invalid parameter. Since the method does not handle the exception, there is no way for the implementer to handle the exception. Perhaps the methods should throw NullPointerException, that way the implementer can catch the Exception in the event the team number does not exist.
https://github.com/RaiderRobotix/blue-alliance-api-java-library/blob/master/src/main/java/com/thebluealliance/api/v3/requests/TeamRequest.java#L34
When passing in a team number to
TeamRequest.getTeam(), the method.getJson()is called on the API response, which will cause a NullPointerException if the team number does not exist. The same result will happen if an invalid event code is provided, or any other similar invalid parameter. Since the method does not handle the exception, there is no way for the implementer to handle the exception. Perhaps the methods should throw NullPointerException, that way the implementer can catch the Exception in the event the team number does not exist.https://github.com/RaiderRobotix/blue-alliance-api-java-library/blob/master/src/main/java/com/thebluealliance/api/v3/requests/TeamRequest.java#L34