The raw error string or Error object
OptionalcustomMessages: Record<string, string>Optional mappings that override or extend the defaults
A user-friendly error message
Pure function — no side effects. Performs case-insensitive substring matching against the provided (or default) message map. Returns the original error string if no mapping matches.
Maps raw Hiyve error messages to user-friendly strings.