More descriptive errors for common issues in the Assistant

Created on 11 January 2025, 3 months ago

Problem/Motivation

As the moment when there is an error we don't show it to the end-user in the assistant which is fine for most errors as we can't expect them them to know.

I think we should do a couple of errors to show people if they have a permission to see it maybe? It should appear in the assistant or in a warning on the page.

Error if there are no credits. - We have encountered an error, it could be that the attached account needs more credits.
Error if it has timed out - We have encountered an error, the request has timed out after X seconds/
Error if there are rate limits - We have encountered and error, the request has hit rate limits. Often AI provider accounts can be upgraded to increase the rate limit.

I think this might cover the most common?

What is the API key is wrong and there is no connection at all? Maybe we should explain that too?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Active

Version

1.0

Component

AI Core module

Created by

🇬🇧United Kingdom yautja_cetanu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @yautja_cetanu
  • 🇬🇧United Kingdom MrDaleSmith

    Just to note, the AI Key is checked as it is saved against the provider settings form for OpenAI so this particular error would be best handled by the providers (as each provider may need a different process to check if the key is usable).

    Do all providers return these errors in a normalised way we can check for consistently?

  • 🇬🇧United Kingdom MrDaleSmith

    Scratch that: this is a duplicate of https://www.drupal.org/project/ai/issues/3499597 📌 Better error handling in the Chatbot Active (which has a more detailed description) so can be closed.

Production build 0.71.5 2024