ErrorsSpecific
HTTP 409Specific
PERIOD_CONFIRM_REQUIRED
The Tracken Accounts app shows a person this for it:
This changes figures already marked done for this period. Confirm to proceed.
Where it comes from
These 20 operations name it:
- POSTCreate a transactioncreateTransaction
- PATCHUpdate a transactionupdateTransaction
- DELDelete a transactiondeleteTransaction
- POSTCreate a sales invoicecreateSalesInvoice
- PATCHUpdate a sales invoiceupdateSalesInvoice
- POSTIssue a sales invoiceissueSalesInvoice
- POSTVoid a sales invoicevoidSalesInvoice
- POSTCreate a purchase invoicecreatePurchaseInvoice
- PATCHUpdate a purchase invoiceupdatePurchaseInvoice
- POSTPost a purchase invoicepostPurchaseInvoice
- POSTVoid a purchase invoicevoidPurchaseInvoice
- POSTCreate a paymentcreatePayment
- DELDelete a paymentdeletePayment
- POSTReconcile a bank linereconcileBankLine
- POSTUndo a reconciliationunreconcileBankLine
- POSTPost a depreciation runpostDepreciationRun
- POSTCreate a fixed assetcreateFixedAsset
- PATCHUpdate a fixed assetupdateFixedAsset
- DELDelete a fixed assetdeleteFixedAsset
- POSTDispose of a fixed assetdisposeFixedAsset
409The envelope
{
"error": {
"code": "PERIOD_CONFIRM_REQUIRED",
"message": "…",
"request_id": "req_01JB4Z0K3Q7V8W9X0Y1Z2A3B4C",
"doc_url": "https://developers.tracken.ee/errors/PERIOD_CONFIRM_REQUIRED"
}
}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 transactions create …
# exits 7 and prints the code, the message, each field problem and the request idimport { isApiError } from "@tracken/sdk";
try {
await tracken.transactions.create(…);
} catch (error) {
if (!isApiError(error, "PERIOD_CONFIRM_REQUIRED")) 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.