mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Throw an error if the AI service return an empty assistant message
This commit is contained in:
7 files changed
+249
-3
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Error thrown when the AI generates an empty message with no content, reasoning, or tool calls.
|
||||
* This typically indicates an issue with the AI provider or model configuration.
|
||||
*/
|
||||
export class EmptyMessageError extends Error {
|
||||
constructor(
|
||||
message: string,
|
||||
public readonly providerModel: string,
|
||||
) {
|
||||
super(message);
|
||||
this.name = 'EmptyMessageError';
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user