Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
l0lawrence committed Jun 11, 2024
commit 32a8fc36afd7f97399836ccc7e34586b093c3f41
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def send(
self._publish(self._namespace, _serialize_events(events), **kwargs)
except Exception as exception: # pylint: disable=broad-except
if exception.response.status_code == 400:
raise HttpResponseError("Are the provided event(s) in CloudEvent format?") from exception
e = HttpResponseError("Are the provided event(s) in CloudEvent format?")
e.status_code = exception.response.status_code
e.reason = exception.response.reason
raise e
self._http_response_error_handler(exception)
raise exception
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ async def send(
await self._publish(self._namespace, _serialize_events(events), **kwargs)
except Exception as exception: # pylint: disable=broad-except
if exception.response.status_code == 400:
raise HttpResponseError("Are the provided event(s) in CloudEvent format?") from exception
e = HttpResponseError("Are the provided event(s) in CloudEvent format?")
e.status_code = exception.response.status_code
e.reason = exception.response.reason
raise e
self._http_response_error_handler(exception)
raise exception
else:
Expand Down