Skip to main content
Glama

Task Trellis MCP

ValidationError.test.ts1.52 kB
import { ValidationError } from "../ValidationError"; import { ValidationErrorCodes } from "../ValidationErrorCodes"; describe("ValidationError", () => { it("should create error with message and code", () => { const error = new ValidationError( "Test error message", ValidationErrorCodes.PARENT_NOT_FOUND, ); expect(error.message).toBe("Test error message"); expect(error.code).toBe(ValidationErrorCodes.PARENT_NOT_FOUND); expect(error.name).toBe("ValidationError"); expect(error.field).toBeUndefined(); }); it("should create error with message, code, and field", () => { const error = new ValidationError( "Parent validation failed", ValidationErrorCodes.PARENT_NOT_FOUND, "parent", ); expect(error.message).toBe("Parent validation failed"); expect(error.code).toBe(ValidationErrorCodes.PARENT_NOT_FOUND); expect(error.name).toBe("ValidationError"); expect(error.field).toBe("parent"); }); it("should be instance of Error", () => { const error = new ValidationError( "Test error", ValidationErrorCodes.INVALID_PARENT_TYPE, ); expect(error).toBeInstanceOf(Error); expect(error).toBeInstanceOf(ValidationError); }); }); describe("ValidationErrorCodes", () => { it("should contain expected error codes", () => { expect(ValidationErrorCodes.PARENT_NOT_FOUND).toBe("PARENT_NOT_FOUND"); expect(ValidationErrorCodes.INVALID_PARENT_TYPE).toBe( "INVALID_PARENT_TYPE", ); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/langadventurellc/task-trellis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server