Skip to content

Conversation

@hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Aug 18, 2025

  • traceback.format_exc() returns a string so we shouldn't json.dumps() it.
  • traceback.format_exc() should always return a truthy value so or e does nothing.
  • The coroutine returned by post_log() is not callable so it doens't make sense to call create_once_callable() on it. We want create_proxy().
  • extract post_log function to top level
  • explicitly convert error to string for clarity when assigning to headers
  • str(e) already includes a traceback so we don't need to include a separate traceback here

cc @dom96

* `traceback.format_exc()` returns a string so we shouldn't json.dumps() it.
* `traceback.format_exc()` should always return a truthy value so `or e`
  does nothing.
* The coroutine returned by `post_log()` is not callable so it doens't make
  sense to call `create_once_callable()` on it. We want `create_proxy()`.
* extract post_log function to top level
* explicitly convert error to string for clarity when assigning to headers
* `str(e)` already includes a traceback so we don't need to include a separate
  traceback here
@hoodmane hoodmane merged commit e7e34a8 into cloudflare:production Aug 19, 2025
5 checks passed
maxvp pushed a commit that referenced this pull request Aug 24, 2025
* `traceback.format_exc()` returns a string so we shouldn't json.dumps() it.
* `traceback.format_exc()` should always return a truthy value so `or e`
  does nothing.
* The coroutine returned by `post_log()` is not callable so it doens't make
  sense to call `create_once_callable()` on it. We want `create_proxy()`.
* extract post_log function to top level
* explicitly convert error to string for clarity when assigning to headers
* `str(e)` already includes a traceback so we don't need to include a separate
  traceback here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants