invidious-copy-2022-03-16/src/invidious
saltycrys 3dac33ffba
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.
2020-11-30 10:59:21 +01:00
..
helpers Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
jobs allow to set a custom anti-captcha api url (#1473) 2020-11-20 22:21:26 +01:00
routes Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
views Merge pull request #1479 from saltycrys/theme-flash 2020-11-28 20:54:45 +00:00
channels.cr Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
comments.cr Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
jobs.cr Provide rough draft of better project organization 2020-10-05 23:57:19 -05:00
mixes.cr Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
playlists.cr Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
routing.cr Extract playlist routes from global file 2020-11-19 19:21:48 -06:00
search.cr Fix warnings with latest version of Crystal 2020-07-26 10:59:31 -04:00
trending.cr Add support for polymer redesign 2020-06-15 18:18:04 -05:00
users.cr Fix warnings with latest version of Crystal 2020-07-26 10:59:31 -04:00
videos.cr feat: centralize ytInitialData parsing 2020-11-26 13:43:53 +01:00