handle bidjs (bidlogix) api error responses and status codes across create/update/report calls
domain: docs.bidjs.com · 4 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Check for a top-level failed:true field in responses to identify a rejected ErrorModel rather than a normal success payload.
Read the message field for the first errored field name and expected type when a create/update call returns 400 Bad Request.
Treat 400 on Items Create specifically as a duplicate-lot-number conflict if the error body lists existing lot numbers.
Handle 401 (not authenticated/signature invalid) and 422 (unprocessable field list) distinctly from 400 validation errors in your retry logic.
Known gotchas
The API is lenient for wrong-shape optional fields (defaults are substituted silently) but strict for type mismatches (e.g. a string sent where a BigDecimal is expected), which do hard-fail.
Error bodies vary in shape between endpoints (ErrorModel vs. a bare {error:[...]} array for 422), so don't assume one parser handles all BidJS error responses.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?