Commit a82f551
committed
Fixes to Python debugging-logs example
* `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 here1 parent f3a6087 commit a82f551
1 file changed
+8
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
| |||
139 | 136 | | |
140 | 137 | | |
141 | 138 | | |
142 | | - | |
143 | | - | |
| 139 | + | |
144 | 140 | | |
145 | 141 | | |
146 | | - | |
147 | | - | |
| 142 | + | |
148 | 143 | | |
149 | 144 | | |
150 | 145 | | |
| |||
0 commit comments