Report error codes (mpbx-api reports, mpbx-cdr)
Codes raised by the report routes (W4-RPT-01). Kinds map to HTTP statuses as for the
common codes; the ones below that need another status say so. Messages never contain
call data. The reader also raises MPBX-CDR-UNREADABLE (cdr.md) and the MPBX-CH-* codes
of storage.md. Guide: docs/guides/reports.md.
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
MPBX-REPORT-BAD-PERIOD | 400 | from is not before until, or the period is longer than 366 days. A timestamp that is not RFC 3339 is MPBX-INVALID-QUERY with the field named. | Send from and until as RFC 3339 with from earlier, at most 366 days apart; omit both for the last 7 days. |
MPBX-CDR-EXPORT-UNAVAILABLE | 501 | The export format has no encoder installed (a build or a test that installs CSV only). | Use format=csv. |
MPBX-CDR-EXPORT-TOO-LARGE | 413 | The file would be too big for its format: a PDF holds at most 20,000 rows, a worksheet 1,048,575. | Use format=csv, or narrow the report. |
MPBX-RBAC-FORBIDDEN | 403 | The caller has no reports:read grant. | Ask for the Supervisor, Department Admin, Manager or Owner role (or a custom role with reports:read). |
MPBX-API-NOT-CONFIGURED | 503 | The server runs without clickhouse.url: there is no call or queue history to report on. | Set [clickhouse] url and restart. |
MPBX-REPORT-SCHEDULE-INVALID | 500 | A stored report schedule holds a report or format the server does not know (a data error; the schedule is disabled and last_error carries this code). Never raised by the API routes, which validate input. | Delete the schedule and create it again; report it if it recurs. |