Error handling

  • Services return a 500 error code when they experience a failure.

  • A 404 error code indicates a resource, like a reader or publication, was not found.

  • When a valid resource isn't accessible to the OAuth service account due to permissions, a GCP IAM error is triggered.

Error Code Possible Causes Resolutions
400 PRECONDITION_FAILED The reader you are trying to delete with DeleteReader still has active entitlements. Remove all entitlements from the reader, or use the force=true option with the DeleteReader`request.
403 PERMISSION_DENIED  
  • The service account lacks the required role for the method being called (e.g., a Subscription Linking Viewer attempting to update entitlements).
  • Verify that you have configured the correct Google Cloud project number in Publisher Center.
  • Ensure the service account has one of the roles.
    • Subscription Linking Admin
    • Subscription Linking Viewer
    • Subscription Linking Entitlements Viewer
404 NOT_FOUND The specified publicationId or ppid doesn't exist. Verify that the provided publicationId and ppid are correct and exist.