Skip to content

Commit

Permalink
Add a link to the documentation on how to enable Appengine APIs in th…
Browse files Browse the repository at this point in the history
…e error message.

PiperOrigin-RevId: 651000411
Change-Id: I07205a9ad13794a724a0d42137037f42108a92db
  • Loading branch information
ludoch authored and gae-java-bot committed Jul 10, 2024
1 parent a4a3b3c commit 2145c33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ public static ApiProxyException convertApiError(APIResponse apiResponse,
return new ApiProxy.ArgumentException(packageName, methodName);
case FEATURE_DISABLED:
return new ApiProxy.FeatureNotEnabledException(
"%s.%s " + apiResponse.getErrorMessage(), packageName, methodName);
"%s.%s Please, enable the Appengine APIs via "
+ "https://cloud.google.com/appengine/docs/standard/java-gen2/services/access "
+ apiResponse.getErrorMessage(),
packageName,
methodName);
case RPC_ERROR:
return convertApiResponseRpcErrorToException(
apiResponse.getRpcError(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,10 @@ public void testFeatureNotEnabledError() {
assertStackTraceIsCorrect(e);
assertThat(e)
.hasMessageThat()
.isEqualTo("generate.feature.disabled.error. You need to turn on billing!");
.isEqualTo(
"generate.feature.disabled.error. Please, enable the Appengine APIs via"
+ " https://cloud.google.com/appengine/docs/standard/java-gen2/services/access You"
+ " need to turn on billing!");
}

@Test
Expand Down

0 comments on commit 2145c33

Please sign in to comment.