Skip to main content
Error format Lender returns most errors as RFC 9457 problem details with the application/problem+json media type. A rate-limit refusal answers a flat {code, title, message} body on application/json.
Field definitions
  • status – The HTTP status code.
  • title – The status name, such as Unprocessable Entity.
  • detail – What went wrong on this occurrence. Below 500, it describes the specific refusal. For 500, 502, and 503, it carries a fixed generic value instead of the underlying cause.
  • errors – Optional list of schema-validation details. Each entry carries a location, a message, and the value Lender received.
  • type – Present on errors the framework produces, where it carries the RFC 9457 default about:blank.
The flat rate-limit body carries code, title, and message instead. Its code repeats the numeric HTTP status. Its title names the refusal and its message explains it in one sentence. Neither string varies with the caller or names your remaining quota. Branch on the HTTP status and the content type, then read detail for the specific refusal. Authorization and idempotency middleware can answer in their own response formats.

Client errors


Lender answers a 4xx when the request is the problem, and detail names the specific refusal. Lender scopes a lookup to the caller’s tenant and to the parent named in the path. An identifier that resolves outside that scope answers the same way as an identifier that resolves to nothing. A command needs a subject on the caller identity, because Lender records that subject as the actor behind the change. Byte limits apply twice: the framework limits the request body, and each file-ingestion surface limits the file it accepts. Schema validation runs before the handler and fills errors with one entry per rejected location. A business rule runs inside the handler and answers with detail alone. Three examples: a currency assertion that disagrees with the loan, a set composition that mixes currencies, and a fund configured without a registry.

Server errors


Lender answers a 5xx when the request is sound and the call could not complete. For these statuses detail carries a fixed generic value, so the underlying cause stays inside the service. A 503 covers two conditions: a capability the deployment does not run, and a dependency Lender cannot reach at the moment of the call. A 502 covers a third party that refuses a command Lender forwards to it, such as the registry that records an assignment of receivables.