-
Notifications
You must be signed in to change notification settings - Fork 19
Adds docs for the AI features errors #309
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
base: main
Are you sure you want to change the base?
Conversation
Deploying yoast-developer with
|
Latest commit: |
b76c57f
|
Status: | ✅ Deploy successful! |
Preview URL: | https://108d0bcc.yoast-developer.pages.dev |
Branch Preview URL: | https://document-ai-error-messages.yoast-developer.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see some documentation for this! 🎉 Here are some initial suggestions.
I would love to see more information on other possible errors:
- site unreachable
- inactive license
- generic errors
- ... basically every error listed in
assets/js/src/ai-generator/components/errors
Second pass on Yoast AI error descriptions.
|
|
@mhkuu The plan is to have any relevant information that is mentioned in the article about Common AI feature problems and errors and is missing from the developer page added to the developer page.
|
Everything regarding these errors/resolutions the help article is correct, except that the "something went wrong" error is not going to be shown on connection timeout, that line can be removed. You will see the connection timeout error instead. |
### Rate limit error | ||
The use of Yoast AI comes with rate limits to ensure fair use. Moreover, we are in the process of introducing a subscription-based limit on the amount of AI generations per month. Please refer to [this page](https://yoa.st/ai-generator-rate-limit-help) to understand the rate limits that are applicable. | ||
|
||
This error message is displayed when you surpass the Yoast AI rate limit for a specific time frame, or (in the future) your Yoast AI sparks limit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to update this documentation once the AI features are tight to the use of sparks? Otherwise, maybe is better to remove the part within the parenthesis (in the future) ?
## Mocking these errors | ||
|
||
### In WordPress | ||
If you need to display these errors without actually triggering them (e.g., displaying the rate limit error without actually reaching the rate limit), you can do so by editing the function `get_suggestions` in `src/ai-generator/user-interface/get-suggestions-route.php` in the Yoast SEO repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add the link to the repository https://github.com/Yoast/wordpress-seo
|
||
### In WordPress | ||
If you need to display these errors without actually triggering them (e.g., displaying the rate limit error without actually reaching the rate limit), you can do so by editing the function `get_suggestions` in `src/ai-generator/user-interface/get-suggestions-route.php` in the Yoast SEO repository. | ||
Replace the content of the `throw` block with one of the errors below. Also, replace the variable in the following `catch` block with the name of the error (e.g. `Bad_Request_Exception`), and add the error to the imports (e.g. `use Yoast\WP\SEO\AI_HTTP_Request\Domain\Exceptions\Bad_Request_Exception;`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to reproduce this steps 🤔 https://github.com/Yoast/wordpress-seo/blob/trunk/src/ai-generator/user-interface/get-suggestions-route.php
- I don't see any throw block.
- There are two
catch
blocks in the get_suggestions function. Because there is nothrow
block, it is unclear which catch should be edited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @marinakoleva 👏🏼 I really like the tabs to display the errors information.
I've added some considerations to look at! 🙂
Summary
This PR documents the errors that the Yoast AI features display.
Relevant technical choices
Technical choices that affect more than this issue:
None.
Test instructions
This PR can be acceptance tested by following these steps:
Quality assurance
_redirects
file in the root of the project.