Spaces:
Running
Running
Add detailed error info to auth failure messages.
Browse filesCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 unmodified lines2930313232333434353637383928 unmodified lines if isinstance(e, openai.RateLimitError): return "Provider rate limit reached. Please retry shortly." if isinstance(e, openai.AuthenticationError): return "Provider authentication failed. Check API key." raw = str(e) return f"Provider authentication failed. Check API key. Details: {raw[:100]}" if isinstance(e, openai.BadRequestError): return "Invalid request sent to provider." raw = str(e) return f"Invalid request sent to provider. Details: {raw[:100]}"
name = type(e).__name__ status_code = getattr(e, "status_code", None)core/anthropic/errors.py+4-2