module

AI::Provider::Errors

Class methods

get_error_message(error) : String

Extracts an error message from various input types.

Returns:

  • "unknown error" for nil
  • The string itself for String inputs
  • The message property for Exception inputs
  • JSON serialization for all other types
Source