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

Add failing test for load status code bug #1355

Closed
wants to merge 1 commit into from

Conversation

bedewilson
Copy link

Failing test for #1161. When the load() function returns a 4XX/5XX status code, but no error, the response resolves with status 200. The specified status code should be passed through instead.

As this relates to an instance where no error (apart from the status code) is provided, I have assumed that the error message should default to the standard http response string (e.g. specifying a 500 status code should result in an error.message of Internal Server Error.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts

@benmccann benmccann changed the title Failing test for #1161 Add failing test for load status code bug May 8, 2021
@benmccann
Copy link
Member

Thanks. We can't really check this PR in with the tests failing. Do you plan to fix the underlying issue as well? If not, then this is still helpful, but I think the best course of action in that case would be to close this to help keep the review queue clean and then we can leave a comment on the issue referencing this PR or your branch so that whoever does fix it can use your test

@bedewilson
Copy link
Author

Thanks - sorry did intend to but have been caught up. Happy to close for now and I will get to it over the next few days.

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