Commit 7c01f98
committed
Include function parameters in error messages
For debugging purposes, it's important that error messages include as much relevant information as possible. It's much easier to help a user if they can pass on an accurate error message that they received.
But precisely because the messages should be in a form where the user can share it without worrying about leaking secrets (and because such errors may end up in logs that could leak), the messages must not include any confidential data.
They should also not be unnecessarily verbose.
To implement this, we add the "debug" serialization of the functions' input values to the error message that's returned if the call fails. We use the 'derivative' crate to "redact" fields containing secret or verbose data (i.e. they render as "...").1 parent e3d6856 commit 7c01f98
4 files changed
+306
-32
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments