wooga/atlas-appcenter

Missing default cases in response handler

Closed this issue · 0 comments

switch (response.statusLine.statusCode) {
case 404:
case 400:
def error = AppCenterError.fromResponse(response)
throw new GradleException("unable to create release upload for ${owner}/${applicationIdentifier}: ${error.code} ${error.message}")
case 201:
return CreateReleaseUpload.fromResponse(response)
}

All new method miss a default case which should throw a generic error. This can lead to null pointer exceptions later in code which are harder to track.