Troubleshoot

This page shows you how to resolve issues with Model Armor.

This section contains troubleshooting steps that you might find helpful if you have problems using Model Armor.

All API calls to Model Armor return a 404 Not Found error

Establish a Private Service Connect to the Model Armor APIs. This error typically occurs when Model Armor regional endpoints (REPs) are accessed using Private Google Access or without a Private Service Connect. For more information, see About accessing regional endpoints through Private Service Connect endpoints.

Sensitive Data Protection filter gives an error or is skipped

Verify the following:

  • The Sensitive Data Protection template is in the same region as the Model Armor endpoint being called.
  • The service agent making the Model Armor request has the dlp.User and dlp.Reader roles in the project containing the Sensitive Data Protection template.

This error occurs due to client errors in the SanitizeUserPrompt or SanitizeModelResponse requests or issues with the Sensitive Data Protection template.

Model Armor global endpoint errors

Ensure that you are making the API requests to the appropriate regional endpoint instead of the global endpoint.

Model Armor supports the following operations only on its regional endpoints:

  • Create, read, update, delete, and list operations on templates.
  • SanitizeUserPrompt and SanitizeModelResponse API requests.

If you make the API requests for those operations to the global endpoint, you will see the following error.

{
  "error": {
    "code": 403,
    "message": "Write access to project '<PROJECT_ID>' was denied",
    "status": "PERMISSION_DENIED"
  }
}