Skip to content
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

feat(app): improve error messaging when Fastly servers are unresponsive #1212

Merged
merged 5 commits into from
May 22, 2024

Conversation

Integralist
Copy link
Collaborator

Thanks to @marceloboeira for the first incarnation of these changes which I butchered via the GitHub UI.

marceloboeira and others added 5 commits May 22, 2024 13:30
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:
* #1210
* https://www.fastlystatus.com/incident/376536
@Integralist Integralist added the enhancement New feature or request label May 22, 2024
@Integralist Integralist merged commit 13d89d3 into main May 22, 2024
8 checks passed
@Integralist Integralist deleted the pr/1211 branch May 22, 2024 14:01
@marceloboeira
Copy link
Contributor

Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants