Commit b00dcab
committed
fix(logging): preserve error properties in secure logging
Error objects have non-enumerable name and message properties that were
being lost during redaction. Added special handling for Error instances
to preserve standard error properties (name, message, stack, code) while
still redacting other enumerable properties.
Fixes failing test: structured-logger.test.js - error object handling1 parent a5bb882 commit b00dcab
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
176 | 194 | | |
177 | 195 | | |
178 | 196 | | |
| |||
0 commit comments