Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assistant: handle errors better #117

Open
josephjclark opened this issue Nov 13, 2024 · 0 comments
Open

assistant: handle errors better #117

josephjclark opened this issue Nov 13, 2024 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

When calling out to anthropic, there are a bunch of errors we might get:

We need to ensure that the chat service returns those errors to Lightning in a fairly responsible way. Ie, with a decent HTTP status code and with a human readable error.

I'd suggest an error structure like this maybe, as the JSON payload:

error: 'LIMIT_EXCEEDED',
message: 'Usage Limit Exceeded',
fix: 'Try again tomorrow or contact your system administrator

I suppose the chat service shouldn't assume it's being called by lightning, but it should still return a good human readable error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant