@securelend/sdk@0.1.0-beta.5 exports these classes:
SecureLendError, withtypeand optionaldetailsAuthenticationError(typeauthentication_error)RateLimitError(typerate_limit_error, optionalretryAfter)ValidationError(typevalidation_error)NotFoundError(typenot_found)NetworkError(typenetwork_error)ServerError(typeserver_error)
dist/index.js, the client throws AuthenticationError when a connection error message contains 401, and NetworkError for other connection failures.
ValidationError is thrown only in two cases. schema.parse throwing a ZodError becomes ValidationError (Invalid response from MCP server: failed to validate JSON content). The inner callTool throws ValidationError (Invalid tool arguments) when a caught error message contains 400.
A response with no structuredContent and no text or application/json content item, a JSON.parse throw, or an invalid content structure becomes SecureLendError with type mcp_error (Invalid response from MCP server: failed to parse JSON content). Other tool failures become SecureLendError with type mcp_tool_error.
RateLimitError, NotFoundError, and ServerError are exported. That file does not construct them. The client does not retry. No requests-per-minute figure is published in the package.
INVALID_INPUT, NO_OFFERS, and UNAUTHORIZED are not defined in the published SDK. A loans HTTP API that returns those codes was not found in the public SecureLend/securelend repository. The platform repository could not be read, so this page does not describe HTTP status codes for that API.