Troubleshooting

How do I handle the Service Control API erros in general?

Google Service Control provides control plane functionality, such as logging, monitoring, to managed services. Therefore, the callers of the Service Control API typically are server applications. Here are general recommendations on how to handle errors at REST/RPC API level:

  • Your server should log all errors returned by the Service Control API, and use the data for toubleshooting your service.
  • If your server receives 429 errors from the Service Control API, it should return 429 errors to its clients.
  • If your server cannot access the Service Control API, it can choose to either fail-open (ignore the error) or file-close (return 503 to its client).
  • If your server receives 500 errors from the Service Control API, it should return 500 error to its clients. Such errors typically mean bugs within the Google Service Control API.
  • If your server receives other errors from the Service Control API, it should return 500 error to its clients. Such errors typically mean bugs within your service.

What does the "service not enabled" error mean?

To use any Google API service, you need to have a Google developer project, enable the service for that project, and pass an API key or an OAuth access token associated with the project for each API request. See Auth Guide for details. To fix this error, you need to enable the service for your project using the Google Cloud Console or Google Cloud SDK.

How do I fix permission denied errors?

Such errors typically mean the caller doesn't have the right Google Cloud IAM permission on certain resources. See the Access Control guide for more details on how to fix this.

How do I perform a retry on API errors?

It is recommended to perform a retry with exponential intervals plus randomness. The minimum retry interval should be 30s for 429 quota errors; 1s for 500 and 503 server errors. For other errors, retry should only be performed based on additional error information. See google.rpc.Code for more details.

How do I request higher API quota?

Visit the quotas page for Google Service Control API and click on Apply for higher quota.