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

Fix Plug.Conn.Status.reason_phrase/1 error message #1131

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

jclem
Copy link
Contributor

@jclem jclem commented Feb 7, 2023

When Plug.Conn.Status.reason_phrase/1 is called with an error code not defined by Plug or via configuration, the message of the ArgumentError that's raised references the atom :unavailable_for_legal_reasons. According to the example code above and below the text, it should instead reference :not_an_rfc_status_code.

Here's hoping HTTP 998 Not An RFC Status Code is never proposed 😆

I hope this typo PR isn't too noisy—it seems worthwhile to correct the confusing error message.

The message referenced the atom `:unavailable_for_legal_reasons`, but should read `:not_an_rfc_status_code`.
@josevalim josevalim merged commit 69cb834 into elixir-plug:main Feb 7, 2023
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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.

2 participants