ErrorsSpecific
HTTP 409Specific
METER_READING_NOT_MONOTONE
The Tracken Accounts app shows a person this for it:
Reading ‹value› does not fit between its neighbours (previous ‹prev_value›, next ‹next_value›). Check the reading; if the meter was replaced, use “Replace” on the object.
A word in ‹angle quotes› is filled from the error's context.
Where it comes from
These 2 operations name it:
409The envelope
{
"error": {
"code": "METER_READING_NOT_MONOTONE",
"message": "…",
"request_id": "req_01JB4Z0K3Q7V8W9X0Y1Z2A3B4C",
"doc_url": "https://developers.tracken.ee/errors/METER_READING_NOT_MONOTONE"
}
}Switch on
code, never on message, which is developer-facing English and may change. Field problems are in details, each with a JSON Pointer; the figures for your own text are in context. Quote request_id when you contact support.Handle it
tracken meter-readings create …
# exits 7 and prints the code, the message, each field problem and the request idimport { isApiError } from "@tracken/sdk";
try {
await tracken.meterReadings.create(…);
} catch (error) {
if (!isApiError(error, "METER_READING_NOT_MONOTONE")) throw error;
// error.code, error.details, error.context and error.requestId are typed
}Install the SDK with npm i @tracken/sdk (0.2.0, MIT, beta), Node.js 22 or later.