File tree Expand file tree Collapse file tree
embrace-gradle-plugin/src/main/java/io/embrace/android/gradle/plugin/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,11 +21,24 @@ fun handleHttpCallResult(
2121 failBuildOnUploadErrors : Boolean ,
2222) {
2323 val msg = when (result) {
24- is Failure -> " failed: ${ endpoint.url} , status= ${ result.code} "
24+ is Failure -> handleHttpFailure( endpoint, result)
2525 is Error -> " errored: ${endpoint.url} , stacktrace=${result.exception.stackTrace.joinToString(" \n " )} "
2626 is Success <* > -> null
2727 }
2828 if (msg != null && failBuildOnUploadErrors) {
2929 error(" Embrace HTTP request $msg " )
3030 }
3131}
32+
33+ private fun handleHttpFailure (
34+ endpoint : EmbraceEndpoint ,
35+ result : Failure ,
36+ ): String {
37+ val msg = " failed: ${endpoint.url} , status=${result.code} "
38+
39+ if (result.code == 403 ) {
40+ return " $msg . Please check that src/main/embrace-config.json contains an " +
41+ " app_id and api_token that match the settings page of your Embrace dashboard."
42+ }
43+ return msg
44+ }
You can’t perform that action at this time.
0 commit comments