-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Fastly API unresponsiveness Errors on Authentication #1211
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When Fastly servers are unresponsive (indicated by a 5xx response), the CLI currently shows a cryptic error message due to unexpected values in the response body (e.g., unable to parse body as JSON). The last incident caused the CLI to display: > ERROR: failed to configure authentication processes: failed to unmarshal OpenID Connect .well-known metadata: invalid character 'I' looking for beginning of value The 'I' referred to the "Internal Server Error" in the response body, which is unclear/unactionable from a user perspective. This change introduces a validation to handle this specific scenario: If the authentication request returns a 5xx status code, it is now recognized as an error. The CLI will display a more actionable message, informing clients that the error is likely due to an outage or incident on the Fastly side. Clients can then check the status page or contact support. Context: * fastly#1210 * https://www.fastlystatus.com/incident/376536
Integralist
approved these changes
May 22, 2024
Integralist
reviewed
May 22, 2024
Integralist
reviewed
May 22, 2024
Integralist
reviewed
May 22, 2024
Integralist
approved these changes
May 22, 2024
This will teach me to make edits via the GitHub UI. I'll pull your branch and fix these things up locally 🙂 |
Superseded by #1212 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When Fastly servers are unresponsive (indicated by a 5xx response), the CLI currently shows a cryptic error message due to unexpected values in the response body (e.g., unable to parse body as JSON).
The last incident caused the CLI to display:
The 'I' referred to the "Internal Server Error" in the response body, which is unclear/unactionable from a user perspective.
This change introduces a validation to handle this specific scenario:
If the authentication request returns a 5xx status code, it is now recognized as an error. The CLI will display a more actionable message, informing clients that the error is likely due to an outage or incident on the Fastly side. Clients can then check the status page or contact support.
Context: