Skip to content

Comments

Don't swallow exceptions#3

Open
Kukunin wants to merge 1 commit intotcocca:masterfrom
Kukunin:dont-swallow-exceptions
Open

Don't swallow exceptions#3
Kukunin wants to merge 1 commit intotcocca:masterfrom
Kukunin:dont-swallow-exceptions

Conversation

@Kukunin
Copy link

@Kukunin Kukunin commented Jul 27, 2019

While it's arguably for rescuing timeouts, it's wrong to swallow all
exceptions.

For example, I spent about an hour figuring out why webmock doesn't work
for zester, while it worked everywhere else. By default, webmock disables
all http requests, and raises exceptions with suggestion to mock it. But
in case with zester, it returned just Web services are currently unavailable, which was really weird: webmock seemed not working and API
call was made, but Zillow returned an error about unavailability.
After all I had to debug to this method.

If exceptions were not swallowed, it was clear where the problem is.

While it's arguably for rescuing timeouts, it's wrong to swallow all
exceptions.

For example, I spent about an hour figuring out why webmock doesn't work
for zester, while it worked everywhere else. By default, webmock disables
all http requests, and raises exceptions with suggestion to mock it. But
in case with zester, it returned just `Web services are currently
unavailable`, which was really weird: webmock seemed not working and API
call was made, but Zillow returned an error about unavailability.
After all I had to debug to this method.

If exceptions were not swallowed, it was clear where the problem is.
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.

1 participant