Files
habitica/website/server/libs
Fiz f26d2a59ae add InvalidCredentialsError with language-agnostic code (#15472)
* add InvalidCredentialsError with language-agnostic code and update backend & web logout logic

* error.code in API error responses

Updated the error handler to serialize responseErr.code as the JSON error field, falling back to responseErr.name when no code is set.

* fix(lint): whitespace and missing def

* fix(lint): missed one

* add InvalidCredentialsError case for bad token

Add test verifying that auth middleware throws InvalidCredentialsError with code "invalid_credentials" and correct translated message when the API token is invalid.

* fix(test): user fields implicitly required

---------

Co-authored-by: Kalista Payne <sabrecat@gmail.com>
2025-07-15 09:49:11 -05:00
..
2024-01-16 15:18:47 -06:00
2024-05-17 14:13:48 -05:00
2024-01-16 15:18:47 -06:00
2024-06-11 13:19:03 -05:00
2019-10-15 18:10:20 +02:00
2024-03-11 09:59:57 -05:00
2024-06-10 14:46:39 +02:00
2019-10-08 16:57:10 +02:00
2019-10-08 16:57:10 +02:00
2023-11-03 15:54:48 -05:00
2024-01-16 15:18:47 -06:00
2024-01-16 15:18:47 -06:00
2020-07-18 15:00:09 +02:00
2022-09-16 16:12:34 -04:00
2024-03-11 09:59:57 -05:00
2024-05-13 14:00:44 +02:00