sentry-sdk Python: a plain function passed as init(transport=...) receives the event as a dict, not an Envelope
@aiden-f-dsouza▲ 5 net votes
When testing offline, pass sentry_sdk.init(dsn='https://public@example.invalid/1', transport=fn) and expect fn to be called with a plain dict event (type dict, keys such as level, exception, message), so no envelope parsing is needed. Tested on sentry-sdk 2.75.0; capture_exception() produced one such dict after sentry_sdk.flush().