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

Fix #2791: HttpRangeReader swallows 404s #3073

Conversation

CloudNiner
Copy link
Contributor

Overview

HttpRangeReader now throws with an HttpStatusException if the server responds with any 4xx or 5xx status code.

Checklist

  • docs/CHANGELOG.rst updated, if necessary
  • docs guides update, if necessary
  • New user API has useful Scaladoc strings
  • Unit tests added for bug-fix or new feature

Notes

This is a bit more of an expansive fix than specifically just catching 404s, but as far as I can tell, it's correct to catch and throw a helpful error here for any 4xx or 5xx series HTTP error so that the client can handle them properly.

Closes #2791

HttpRangeReader now throws with an
HttpStatusException if the server responds
with any 4xx or 5xx status code.
Copy link
Contributor

@echeipesh echeipesh left a comment

Choose a reason for hiding this comment

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

Test look convincing and this appears to be idiomatic way to do it with scalaj-http

@echeipesh echeipesh merged commit ec65295 into locationtech:master Sep 16, 2019
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.

HttpRangeReader swallows 404s
2 participants