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(next-drupal): translatePath, getResourceByPath - throw error when backend error #739

Conversation

marcorcau
Copy link

Until now, any not-ok response from decoupled router was treated equally, as a 404 Not Found. Behaviour is changed differentiating between 404 Not Found and server error. The advantage is frontend holds to previous built page and doesn't update public page content with a 404 due to backend issues.

BREAKING CHANGE:
Might break sites relying on response being the same in 404 than in 50x.

Fixes #687

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • Other

GitHub Issue: #
Please add a link to the GitHub issue
where this problem is discussed.

  • I need help adding tests. (mark with an "x")
    Code changes need test coverage. If you don't know
    how to make tests, check this box to ask for help.

Describe your changes

A clear and concise description of what the request is.

If applicable, add screenshots to help explain your issue.

…n backend error

Until now, any not-ok response from decoupled router was treated equally, as a 404 Not Found.
Behaviour is changed differentiating between 404 Not Found and server error.
The advantage is frontend holds to previous built page and doesn't update public page content
with a 404 due to backend issues.

BREAKING CHANGE:
Might break sites relying on response being the same in 404 than in 50x.

Fixes chapter-three#687
Copy link

vercel bot commented Apr 14, 2024

Someone is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

@marcorcau marcorcau closed this Apr 14, 2024
@marcorcau marcorcau deleted the feature/issue-687-translate-path-backend-error branch April 14, 2024 12:17
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.

translatePath: Throw error when server responds Internal Server Error
1 participant