Skip to content

Fix #2791: HttpRangeReader swallows 404s - #3073

Merged
echeipesh merged 2 commits into
locationtech:masterfrom
CloudNiner:feature/awf/http-range-swallows-404#2791
Sep 16, 2019
Merged

echeipesh merged 2 commits into
locationtech:masterfrom
CloudNiner:feature/awf/http-range-swallows-404#2791

Conversation

@CloudNiner

Copy link
Copy Markdown
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.

@echeipesh echeipesh left a comment

Copy link
Copy Markdown
Contributor

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