Skip to main content
@securelend/sdk@0.1.0-beta.5 exports these classes:
  • SecureLendError, with type and optional details
  • AuthenticationError (type authentication_error)
  • RateLimitError (type rate_limit_error, optional retryAfter)
  • ValidationError (type validation_error)
  • NotFoundError (type not_found)
  • NetworkError (type network_error)
  • ServerError (type server_error)
In the published 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.
Codes 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.