mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
chore(server): add detail for error (#13151)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Error messages for unavailable copilot providers now include specific model IDs for clearer context. * Added new detailed error messages for embedding generation failures specifying provider and error details. * The API and GraphQL schema have been extended with new error types reflecting these detailed error cases. * **Bug Fixes** * Enhanced error handling to detect and report incomplete or missing embeddings from providers. * Added safeguards to skip embedding insertions when no embeddings are provided, preventing unnecessary processing. * **Documentation** * Updated localization and translation keys to support dynamic error messages with model IDs and provider details. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -8706,13 +8706,22 @@ export function useAFFiNEI18N(): {
|
||||
*/
|
||||
["error.COPILOT_SESSION_DELETED"](): string;
|
||||
/**
|
||||
* `No copilot provider available.`
|
||||
* `No copilot provider available: {{modelId}}`
|
||||
*/
|
||||
["error.NO_COPILOT_PROVIDER_AVAILABLE"](): string;
|
||||
["error.NO_COPILOT_PROVIDER_AVAILABLE"](options: {
|
||||
readonly modelId: string;
|
||||
}): string;
|
||||
/**
|
||||
* `Failed to generate text.`
|
||||
*/
|
||||
["error.COPILOT_FAILED_TO_GENERATE_TEXT"](): string;
|
||||
/**
|
||||
* `Failed to generate embedding with {{provider}}: {{message}}`
|
||||
*/
|
||||
["error.COPILOT_FAILED_TO_GENERATE_EMBEDDING"](options: Readonly<{
|
||||
provider: string;
|
||||
message: string;
|
||||
}>): string;
|
||||
/**
|
||||
* `Failed to create chat message.`
|
||||
*/
|
||||
|
||||
@@ -2164,8 +2164,9 @@
|
||||
"error.COPILOT_SESSION_NOT_FOUND": "Copilot session not found.",
|
||||
"error.COPILOT_SESSION_INVALID_INPUT": "Copilot session input is invalid.",
|
||||
"error.COPILOT_SESSION_DELETED": "Copilot session has been deleted.",
|
||||
"error.NO_COPILOT_PROVIDER_AVAILABLE": "No copilot provider available.",
|
||||
"error.NO_COPILOT_PROVIDER_AVAILABLE": "No copilot provider available: {{modelId}}",
|
||||
"error.COPILOT_FAILED_TO_GENERATE_TEXT": "Failed to generate text.",
|
||||
"error.COPILOT_FAILED_TO_GENERATE_EMBEDDING": "Failed to generate embedding with {{provider}}: {{message}}",
|
||||
"error.COPILOT_FAILED_TO_CREATE_MESSAGE": "Failed to create chat message.",
|
||||
"error.UNSPLASH_IS_NOT_CONFIGURED": "Unsplash is not configured.",
|
||||
"error.COPILOT_ACTION_TAKEN": "Action has been taken, no more messages allowed.",
|
||||
|
||||
Reference in New Issue
Block a user