We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/firehydrant/firehydrant-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
sdkvalidationerror.ts•1.05 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
export class SDKValidationError extends Error {
/**
* The raw value that failed validation.
*/
public readonly rawValue: unknown;
/**
* The raw message that failed validation.
*/
public readonly rawMessage: unknown;
constructor(message: string, cause: unknown, rawValue: unknown) {
super(`${message}: ${cause}`);
this.name = "SDKValidationError";
this.cause = cause;
this.rawValue = rawValue;
this.rawMessage = message;
}
/**
* Return a pretty-formatted error message if the underlying validation error
* is a ZodError or some other recognized error type, otherwise return the
* default error message.
*/
public pretty(): string {
if (this.cause instanceof z.ZodError) {
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
} else {
return this.toString();
}
}
}
export function formatZodError(err: z.ZodError): string {
return z.prettifyError(err);
}