Files
sure/app/models
Copilot a07b1f00c3 Guard error.message with rescue in LLM failed-usage recording (#1144)
* Initial plan

* Fix nil references in Recording failed LLM usage code paths

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Replace error&.message with rescue-guarded safe_error_message helper

error&.message only guards against nil; it still raises when the error
object's .message implementation itself throws (e.g. OpenAI errors that
call data on nil). Replace with a safe_error_message helper that wraps
error&.message in a rescue block, returning a descriptive fallback
string on secondary failures. Apply the helper in both record_usage_error
(usage_recorder.rb) and record_llm_usage (openai.rb), including the
regex branch of extract_http_status_code in both files.

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
2026-03-07 18:49:13 +01:00
..
2026-01-09 19:38:04 +01:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:37:07 +01:00
2026-01-23 22:05:28 +01:00
2026-02-16 21:11:41 +01:00
2026-01-23 22:05:28 +01:00
2025-11-25 20:21:29 +01:00