mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 16:19:10 +03:00
* Add a new function to ai-commands package. * Add a new API route to all three apps. * Refactor the Command component to use the new URL. * Resort the imports.
29 lines
598 B
TypeScript
29 lines
598 B
TypeScript
export class ApplicationError extends Error {
|
|
constructor(
|
|
message: string,
|
|
public data: Record<string, any> = {}
|
|
) {
|
|
super(message)
|
|
}
|
|
}
|
|
|
|
export class ContextLengthError extends ApplicationError {
|
|
constructor() {
|
|
super('LLM context length exceeded')
|
|
}
|
|
}
|
|
|
|
export class EmptyResponseError extends ApplicationError {
|
|
constructor() {
|
|
super('LLM API response succeeded but returned nothing')
|
|
}
|
|
}
|
|
|
|
export class EmptySqlError extends ApplicationError {
|
|
constructor() {
|
|
super('LLM did not generate any SQL')
|
|
}
|
|
}
|
|
|
|
export class UserError extends ApplicationError {}
|