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

Consider 4xx and 5xx status as error instead of trying to render MD #84

Merged
merged 11 commits into from
Jul 5, 2024

Conversation

rtablada
Copy link
Contributor

In the current implementation RemoteData will only error if the underlying JSON parse is unsuccessful on json header responses.

There are cases where a static server may serve up 4xx/5xx responses and send invalid MD files that could even be insecure content.

This chance is reduced by the utilize-routes changes, but is still possible if a user keeps the docs open and a page is moved/deleted thus causing the server to send invalid MD (in the case of GH pages or S3 static site defaults 404 requests will send the index HTML which likely is not valid to try and parse/render).

Copy link

vercel bot commented Jun 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kolay-docs-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 7:22pm

@@ -14,6 +14,7 @@ export default Route(
<div style="border: 1px solid red; padding: 1rem;">
{{error}}
</div>
{{(removeLoader)}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense, thanks!

@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Jun 30, 2024
@NullVoxPopuli NullVoxPopuli force-pushed the utilize-routes branch 2 times, most recently from 77fe7a8 to 92a0424 Compare June 30, 2024 00:34
@rtablada rtablada force-pushed the error-response branch 3 times, most recently from d5393da to 2a12528 Compare July 1, 2024 17:15
@NullVoxPopuli NullVoxPopuli changed the base branch from utilize-routes to main July 3, 2024 23:50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derivation intensifies!

@NullVoxPopuli NullVoxPopuli merged commit a1d8df0 into universal-ember:main Jul 5, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants