Skip to content

Conditions under which Maxwell.Error are raised #33

@bitwalker

Description

@bitwalker

@zhongwencool I think there is another important change we should make. Currently, if you call get!/1, it raises if the status code is not in the range 200..299 or if an error is returned. I think raising in this situation isn't a good idea. If the request succeeded, but the status code wasn't successful, say 404, we should still return Maxwell.Conn.t instead of raising, and let the user check the status code to determine what to do with the request, and only raise Maxwell.Error if an actual adapter/middleware error occurs.

Thoughts?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions