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(dispatch): Updating default event dispatcher to actually raise exceptions #140

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

aliabbasrizvi
Copy link
Contributor

Address issue raised here

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.661% when pulling 63efaf8 on ali/update_event_dispatcher into 56a64e8 on master.

@aliabbasrizvi aliabbasrizvi changed the title Updating default event dispatcher to actually raise exceptions fix(dispatch): Updating default event dispatcher to actually raise exceptions Aug 29, 2018
@aliabbasrizvi
Copy link
Contributor Author

build-e2e

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

lgtm

@aliabbasrizvi aliabbasrizvi merged commit f3e395a into master Aug 29, 2018
@aliabbasrizvi aliabbasrizvi deleted the ali/update_event_dispatcher branch August 29, 2018 19:09
requests.post(
event.url, data=json.dumps(event.params), headers=event.headers, timeout=REQUEST_TIMEOUT
).raise_for_status()

except request_exception.RequestException as error:
Copy link
Contributor

@nchilada nchilada Mar 1, 2019

Choose a reason for hiding this comment

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

It looks like this would catch any requests.HTTPError, which makes me wonder whether the PR is titled correctly. At the very least, I would describe it in the release notes as "Updated the default event dispatcher to log an error if the request resolves to HTTP 4xx or 5xx" (per https://github.com/kennethreitz/requests/blob/bedd9284c9646e50c10b3defdf519d4ba479e2c7/requests/models.py#L933-L940).

@aliabbasrizvi what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

And by the way, should we consider calling the customer's error handler as well?

Or should we actually raise upon certain kinds of errors? Instead of catching and logging from within the default event dispatcher.

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.

None yet

4 participants