Juan José Mata
d49250826b
Improve error handling with user-friendly messages and classification ( #1591 )
...
* Improve chat LLM error messages
* Fix chat visibility regression in tests
* Harden chat error handling for review feedback
* Fix rubocop private method indentation
* Fix nil presentable_error_message, i18n strings, bare rescue
- Guard `presentable_error_message` with `return nil if error.blank?` so
chats with no error return nil instead of the fallback string; this
prevents the API serialisers from emitting a spurious error message and
stops the mobile polling guard from firing on every successful chat
- Move all hardcoded user-facing error strings into
config/locales/models/chat/en.yml and reference them via I18n.t()
- Replace bare `rescue` in `error_message_for` with `rescue StandardError`
to avoid swallowing system-level exceptions
- Update tests to reference I18n keys instead of raw strings, and add
tests for the nil-error case and the unrecognized-error fallback
https://claude.ai/code/session_01YFMjEds5WVyKPL42xBqMCX
---------
Co-authored-by: SureBot <sure-bot@we-promise.com >
Co-authored-by: Claude <noreply@anthropic.com >
2026-04-29 17:51:06 +02:00
..
2026-04-07 20:46:05 +02:00
2026-04-15 18:45:24 +02:00
2026-04-08 21:05:58 +02:00
2026-04-07 14:43:17 +02:00
2026-04-07 14:43:17 +02:00
2026-04-01 20:25:06 +02:00
2026-04-01 20:25:06 +02:00
2026-04-11 21:37:07 +02:00
2026-02-06 18:04:03 +01:00
2026-04-15 23:25:41 +02:00
2026-04-16 17:44:42 +02:00
2026-04-11 21:32:20 +02:00
2026-02-06 18:04:03 +01:00
2026-04-13 00:51:23 +02:00
2026-04-19 11:16:04 +02:00
2026-04-01 20:25:06 +02:00
2026-04-27 18:33:22 +02:00
2026-01-09 13:14:14 +01:00
2026-02-19 18:58:01 +01:00
2026-01-23 00:53:24 +01:00
2026-03-11 15:54:01 +01:00
2025-10-28 19:32:27 +01:00
2025-05-24 19:16:55 -04:00
2026-04-15 18:45:24 +02:00
2026-03-23 12:34:43 +01:00
2026-03-26 19:01:35 +01:00
2026-02-16 13:50:06 +01:00
2026-04-10 17:42:16 +02:00
2025-11-24 14:07:14 +01:00
2026-04-18 09:50:34 +02:00
2026-04-07 14:43:17 +02:00
2026-04-18 09:50:34 +02:00
2026-01-22 20:52:49 +01:00
2026-04-13 21:23:59 +02:00
2026-04-08 21:05:58 +02:00
2025-07-15 11:42:41 -04:00
2026-03-20 17:01:31 +01:00
2026-01-22 15:25:43 +01:00
2026-01-07 15:59:04 +01:00
2026-03-25 10:50:23 +01:00
2025-11-24 14:07:14 +01:00
2026-03-25 17:47:04 +01:00
2026-04-29 15:30:04 +02:00
2026-02-06 21:25:52 +01:00
2026-03-14 20:14:18 +01:00
2025-05-27 05:04:58 -05:00
2026-04-15 18:45:24 +02:00
2025-11-01 10:15:33 +01:00
2026-04-07 14:43:17 +02:00
2026-04-07 14:43:17 +02:00
2026-04-13 20:03:55 +02:00
2026-04-23 21:28:38 +02:00
2026-03-11 15:54:01 +01:00
2026-04-01 20:27:29 +02:00
2026-04-29 17:51:06 +02:00
2026-01-21 22:56:39 +01:00
2026-01-21 22:56:39 +01:00
2026-04-11 21:37:07 +02:00
2026-01-07 15:59:04 +01:00
2026-02-19 19:51:42 +01:00
2024-10-03 14:42:22 -04:00
2026-04-10 23:19:48 +02:00
2026-03-20 21:19:30 +01:00
2026-04-13 00:51:23 +02:00
2026-02-19 18:07:47 +01:00
2026-02-11 15:22:56 +01:00
2025-09-24 00:19:51 +02:00
2026-04-13 19:53:04 +02:00
2026-04-08 21:05:58 +02:00
2025-09-24 00:19:51 +02:00
2026-01-12 14:40:30 +01:00
2026-03-25 17:47:04 +01:00
2026-02-08 18:19:37 +01:00
2026-02-08 18:19:37 +01:00
2026-04-11 15:09:59 +02:00
2026-01-18 17:29:02 +01:00
2026-03-10 13:44:53 +01:00
2024-02-02 19:37:10 -06:00
2026-04-18 00:06:24 +02:00
2026-04-07 20:46:05 +02:00
2026-03-19 15:17:55 +01:00
2026-01-22 20:37:07 +01:00
2026-02-06 18:04:29 +01:00
2025-10-25 22:23:28 +02:00
2026-02-03 15:45:25 +01:00
2025-11-11 19:51:07 +01:00
2026-03-19 15:17:55 +01:00
2025-10-31 13:29:44 +01:00
2025-04-01 08:41:49 -04:00
2026-04-05 09:27:24 +02:00
2026-03-26 19:01:35 +01:00
2026-04-03 12:38:37 +02:00
2026-03-13 07:59:45 +01:00
2026-04-10 17:42:16 +02:00
2025-11-11 19:51:07 +01:00
2026-04-29 13:00:38 +02:00
2025-08-12 02:59:16 +02:00
2025-11-17 21:51:37 +01:00
2025-10-22 19:51:24 +02:00
2026-01-23 00:27:00 +01:00
2026-03-20 14:52:09 +01:00
2026-01-23 00:27:00 +01:00
2026-01-22 20:52:49 +01:00
2026-02-10 23:14:58 +01:00
2025-05-13 15:53:13 -04:00
2026-03-23 14:27:41 +01:00
2025-05-24 17:58:17 -04:00
2024-07-10 11:22:59 -04:00
2026-01-16 21:04:10 +01:00
2026-03-28 19:03:16 +01:00
2026-03-14 23:56:27 +01:00
2026-01-23 22:12:02 +01:00
2026-04-10 23:19:48 +02:00
2026-01-12 15:35:14 -05:00
2025-02-21 11:57:59 -05:00
2025-05-27 05:04:58 -05:00
2026-04-19 08:25:49 +02:00