Skip to content

Better error handling for the URL demo#85

Merged
rviscomi merged 1 commit intomainfrom
demo-url
Aug 10, 2023
Merged

Better error handling for the URL demo#85
rviscomi merged 1 commit intomainfrom
demo-url

Conversation

@rviscomi
Copy link
Owner

@rviscomi rviscomi commented Aug 10, 2023

https://twitter.com breaks the proxy. It does a 302 redirect to itself. Visiting in a browser doesn't have a redirect loop somehow, but fetching from the server side does.

https://rviscomi.github.io/capo.js/user/demo/?url=https%3A%2F%2Ftwitter.com

The client script will happily attempt to parse the empty response, so this fix immediately throws an error for the special HTTP 502 in response to this edge case as well as any other unexpected errors.

@rviscomi rviscomi merged commit f69aa00 into main Aug 10, 2023
@rviscomi rviscomi deleted the demo-url branch August 10, 2023 03:31
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.

1 participant