EdgeAIG/opencode / .opencode /node_modules /@ai-sdk /provider /src /errors /invalid-response-data-error.ts
EdgeAIG's picture
download
raw
797 Bytes
import { AISDKError } from './ai-sdk-error';
const name = 'AI_InvalidResponseDataError';
const marker = `vercel.ai.error.${name}`;
const symbol = Symbol.for(marker);
/**
* Server returned a response with invalid data content.
* This should be thrown by providers when they cannot parse the response from the API.
*/
export class InvalidResponseDataError extends AISDKError {
private readonly [symbol] = true; // used in isInstance
readonly data: unknown;
constructor({
data,
message = `Invalid response data: ${JSON.stringify(data)}.`,
}: {
data: unknown;
message?: string;
}) {
super({ name, message });
this.data = data;
}
static isInstance(error: unknown): error is InvalidResponseDataError {
return AISDKError.hasMarker(error, marker);
}
}

Xet Storage Details

Size:
797 Bytes
·
Xet hash:
806346bc3ecf9b0fedbe249822f7e31d5448f059aea7af2a50e023dadf5eeb13

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.