Skip to content

Improving error handling #3

Description

@drvn-mr

Hi, thanks for the work on this gem.

I noticed the current code doesn't handle errors at all, so a bad response would result in trying to parse invalid JSON.

I'm mostly making this issue to work out how errors should be handled.

An easy solution could be simply returning nil for WeatherResponse.weather when !response.success?
But it's possible we could want to provide more info in the regular response, without the user having to look at the raw response.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions