Skip to content

Vertex authorization error is not reported. #15

Description

@damo

If I use an invalid OAuth2 token to connect to Vertex, the response has code 401 and the response body looks like this:

[{
  "error": {
    "code": 401,
    "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED",
        "metadata": {
          "method": "google.cloud.aiplatform.v1.PredictionService.StreamRawPredict",
          "service": "aiplatform.googleapis.com"
        }
      }
    ]
  }
}
]

That all seems reasonable, but why does the ErrorHandler not throw an UnauthorizedException? Or is the exception being swallowed up somewhere?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions