Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Nov 12, 2024

PR Summary

Use prod access endpoint first and fall back to the test endpoint when it's not available. In this way, we can unblock the public preview without the prod endpoint being fixed, but also rely on the prod endpoint when it's fixed.

Copy link
Contributor

@NoriZC NoriZC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daxian-dbw
Copy link
Member Author

The Copilot Access API uses standard HTTP status codes to indicate the success or failure of a request:

  • 200 OK: The request was successful, and the response contains the authorization status.
  • 401 Unauthorized: Common causes include missing tokens, invalid Object ID or Tenant ID, or incorrect audience claims.
  • 403 Forbidden: The token lacks the required claims.
  • 500 Internal Server Error: An unexpected error occurred on the server.

Even though we only saw 403 so far, I think it's safer to fall back to canary for other possible unsuccessful status code too, as we don't know what may happen when the prod endpoint is getting fixed for us.

@daxian-dbw daxian-dbw merged commit 6beaf33 into PowerShell:main Nov 12, 2024
3 checks passed
@daxian-dbw daxian-dbw deleted the access branch November 12, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants