diff options
| author | saltycrys <73420320+saltycrys@users.noreply.github.com> | 2020-11-30 10:59:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-30 10:59:21 +0100 |
| commit | 3dac33ffbaecff281a46b6d562a2c69f086ff33c (patch) | |
| tree | 0dd95581aab117781a7e57371fc7e5d5e757b466 /config/migrate-scripts/migrate-db-3646395.sh | |
| parent | fe73eccb90552084cef0a4de338b4141b54633e4 (diff) | |
| download | invidious-3dac33ffbaecff281a46b6d562a2c69f086ff33c.tar.gz invidious-3dac33ffbaecff281a46b6d562a2c69f086ff33c.tar.bz2 invidious-3dac33ffbaecff281a46b6d562a2c69f086ff33c.zip | |
Add backtraces to errors (#1498)
Error handling has been reworked to always go through the new `error_template`,
`error_json` and `error_atom` macros.
They all accept a status code followed by a string message or an exception
object. `error_json` accepts a hash with additional fields as third argument.
If the second argument is an exception a backtrace will be printed, if it is a
string only the string is printed. Since up till now only the exception message
was printed a new `InfoException` class was added for situations where no
backtrace is intended but a string cannot be used.
`error_template` with a string message automatically localizes the message.
Missing error translations have been collected in https://github.com/iv-org/invidious/issues/1497
`error_json` with a string message does not localize the message. This is the
same as previous behavior. If translations are desired for `error_json` they
can be added easily but those error messages have not been collected yet.
Uncaught exceptions previously only printed a generic message ("Looks like
you've found a bug in Invidious. [...]"). They still print that message
but now also include a backtrace.
Diffstat (limited to 'config/migrate-scripts/migrate-db-3646395.sh')
0 files changed, 0 insertions, 0 deletions
