API Error Handling
When requests fail, GoingMerry returns standard HTTP status codes accompanied by a structured JSON error body.
1. Error Payload Schema
All error payloads follow a unified format:
{
"error": "Error message description detailing what failed"
}
2. Common Status Codes
400 Bad Request
The request body contains invalid parameter types or missing fields.
- Example: Sending a number instead of a string array for chat messages.
{ "error": "invalid messages parameter format" }
404 Not Found
The requested model configuration tag does not exist locally.
- Example: Invoking
merry run non-existent-model.
{ "error": "model 'non-existent-model' not found, pull it first" }
500 Internal Server Error
The GPU failed to allocate memory or compile branchless kernels.
{ "error": "out of memory: failed to allocate 4.7GB tensor cache on GPU" }