Skip to content

Detect User-Agent to return Error HTML #65

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

Closed
dkundel opened this issue Aug 5, 2019 · 0 comments · Fixed by #67
Closed

Detect User-Agent to return Error HTML #65

dkundel opened this issue Aug 5, 2019 · 0 comments · Fixed by #67
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dkundel
Copy link
Contributor

dkundel commented Aug 5, 2019

Right now we return a pretty Error page regardless of who requests it.
This is great for the browser but not great for the Twilio Debugger. We should return a text/plain response in that case.

The easiest way for this would be to detect the browser through a User-Agent and otherwise return text/plain.

@dkundel dkundel added enhancement New feature or request good first issue Good for newcomers labels Aug 5, 2019
dkundel added a commit that referenced this issue Aug 5, 2019
This adds both browser detection for pretty error messages and adds support for string error
messages

fix #64, fix #65
dkundel added a commit that referenced this issue Aug 5, 2019
This adds both browser detection for pretty error messages and adds support for string error
messages

fix #64, fix #65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant