What an error code of the API tells you
The envelope of an error, where its code comes from, and every code the API answers with — what each means and asks you to do.
4 min read
When the API refuses a request or cannot carry it out, its answer carries a code — the stable name of what happened. This page lists the codes the API answers with and says what each means and what to do about it. Branch on the code, never on the message.
The envelope of an error
An error the API reports itself comes in one envelope. Overview describes its fields and the few answers that come without it.
{
"error": {
"code": "budget_exceeded",
"message": "Budget 74438200973595137 (monthly) exceeded",
"request_id": "7c2e9a41-3b8d-4f6a-9e15-c04d2b7a8f63"
}
}A code that carries more puts it in details. A pool that ran out of connections names the last failure of the call there.
{
"error": {
"code": "pool_exhausted",
"message": "No provider connection could serve the request after 3 attempt(s)",
"details": { "last_error_code": "provider_rate_limit" },
"request_id": "0d3c1b9e-5a47-4f0e-9a36-2f6c8d1e7b42"
}
}Beside each code the tables below print the HTTP status the API answers it with — two for a code with two meanings — and a dash for a code that is never the answer to a request.
The SDKs keep the code
Both SDKs raise an error for an answer that is one, and the error keeps the code of the API: code in Node.js, errorCode in PHP. The first table below names the type each SDK raises for its codes. The codes of the other two tables have no type of their own, and the rule under each of those tables says which type an SDK raises. Handling errors shows how to catch them.
Codes an SDK has a type for
Each SDK raises a type of its own for these codes. Most of them come from the operations an SDK calls: a request to a flow and the model calls it makes, the credits of a customer.
| Code | HTTP status | SDK error type | What it means | What to do |
|---|---|---|---|---|
invalid_api_key | 401 | AuthenticationException PHPAuthenticationError Node.js | The request carries no API key, or a key Slen does not know — copied wrong, revoked, or replaced by a rotation. | Check the value of the Authorization header. A key that was revoked does not work again; issue a new one in the console. |
insufficient_scope | 403 | AuthenticationException PHPAuthenticationError Node.js | The key is valid and lacks the scope the operation requires — or the role of the person signed in to the console does not include it. The message of the error names that scope, and speaks of an API key in both cases. | Use a key that has the scope, or issue one that has it. Give a key only the scopes its service needs. A person signed in to the console needs a role that includes the scope; an owner or an admin of the organization gives it. |
not_authenticated | 401 | AuthenticationException PHPAuthenticationError Node.js | Nobody is signed in. The request has no API key and no session of a person signed in to the console, or the session has ended. | Send an API key in the Authorization header, or sign in to the console again. |
not_a_member | 403 | AuthenticationException PHPAuthenticationError Node.js | The person signed in to the console is not a member of the organization the request is about, or does not belong to any organization yet. | Accept an invitation to the organization, or switch to an organization you are a member of. |
account_suspended | 403 | AuthenticationException PHPAuthenticationError Node.js | The account of the person signing in is suspended, and the sign-in is refused. | The account cannot sign in until it is restored. Write to support to learn why. |
policy_denied | 403 | PolicyDeniedException PHPPolicyDeniedError Node.js | A policy refused the request before any money was held. The message of the error names the policy. | Read in the message which policy refused. Change the request — the model, the operation, the cost — or change the policy in the console. |
model_not_allowed | 403 | PolicyDeniedException PHPPolicyDeniedError Node.js | A model node of the flow names a model the catalogue does not have, or one that is switched off. The execution ends as failed with this code. | Choose a model from the list of models in the model node — the list holds the active models that have a price in effect — and publish a new version. |
budget_exceeded | 402 | BudgetExceededException PHPBudgetExceededError Node.js | The call would take a budget over its limit. What the budget already holds and has spent in its current window, together with the hold this call asks for, is more than the limit. | Wait for the next window of the budget — its resets_at says when; a budget of the type total does not start again. Or raise the limit of the budget. |
operation_limit_exceeded | 402 | OperationLimitExceededException PHPOperationLimitExceededError Node.js | A per-operation budget caps what one call of the operation may hold, and the hold this call asks for is above that cap. | Ask for less — fewer output tokens, a cheaper model — or raise the cap. The same request is refused again until one of them changes. |
concurrency_limit_exceeded | 402 | ConcurrencyLimitException PHPConcurrencyLimitError Node.js | A budget of the type concurrency — Concurrent holds in the console — allows a set number of holds to be open at the same time, and all of them are taken by calls that are running. | Send the request again once a running call has ended, or raise the limit of the budget. A request to a flow goes again under a new key, since its rejected execution keeps the key it had. This is not the rate limit of the key. |
insufficient_credits | 402 | InsufficientCreditsException PHPInsufficientCreditsError Node.js | The credit account of the customer cannot cover the price of the call in credits, or the customer has no account of that credit type. A charge or an adjustment is refused the same way when it would leave the balance below what the account holds. | Top up the credits of the customer. An account whose settings allow a negative balance does not refuse. |
customer_blocked | 403 | CustomerBlockedException PHPCustomerBlockedError Node.js | The end customer the run is made for is blocked. A new run of theirs is refused before anything is created. A run of theirs already under way is refused at its next hold of credits, and the execution ends with this code. | Unblock the customer to let their runs through again. While a customer is blocked, their credits can still be topped up, charged and adjusted, and their statement read. |
customer_not_found | 404 | CustomerNotFoundException PHPCustomerNotFoundError Node.js | The project does not know the customer the request names — the customer was never added, topped up or set up, or was deleted. A priced call for such a customer is refused this way, and so is a read, a block, a charge or a deletion. An adjustment of an account that does not exist is refused the same way. | Add the customer first, or top them up — a top-up creates the customer and the account. |
overrun_stopped | 402 | OverrunStoppedException PHPOverrunStoppedError Node.js | The estimate of a model call in a flow, made again after its hold was taken and before the provider is called, came out larger than the hold by more than the overrun tolerance of the node, and the overrun policy of the model node is to stop. The hold was given back, and the provider was not called. The same code ends the execution when a person refused the approval an overrun asked for, or nobody answered in time. A new model node has no overrun policy, and a policy that a node has practically never fires, because both estimates come from the same request a moment apart. | Send the request again under a new key — the call is estimated anew and takes a hold of its own. To stop such refusals, turn the overrun policy of the model node off and publish a new version. |
overrun_approval_required | 402 | OverrunApprovalRequiredException PHPOverrunApprovalRequiredError Node.js | The estimate of a model call in a flow, made again after its hold was taken and before the provider is called, came out larger than the hold by more than the overrun tolerance of the node, and the overrun policy of the model node asks a person to approve the difference. The execution waits for that decision, so the request is answered with the waiting execution, not with this code. A new model node has no overrun policy, and a policy that a node has practically never fires, because both estimates come from the same request a moment apart. | Decide on the approval in the console. An approval that is refused, or that nobody decides in time, ends the execution with overrun_stopped. |
idempotency_conflict | 409 | IdempotencyConflictException PHPIdempotencyConflictError Node.js | The Idempotency-Key was used before by another request — the same key with another body, or the key of another top-up, charge or adjustment of the project. | Send the new request under a new key. A repeat of the first request under its key is answered as before. |
idempotency_in_progress | 409 | IdempotencyConflictException PHPIdempotencyConflictError Node.js | A model call of a flow met a hold that still stands under its own key, and was refused so that the provider is not called twice. The execution ends as failed with this code. An ordinary run never meets it. | Read the execution and its trace. Send the request again under a new key only if you still need the answer — the first call may have been paid for. |
cost_calculation_failed | 422 | InvalidRequestException PHPInvalidRequestError Node.js | The model is active and has no price in effect, so Slen cannot compute what the call would cost, and the call is refused. | Name a model from the list of models — it holds the active models that have a price in effect. |
provider_not_configured | 422 | ProviderException PHPProviderError Node.js | No connection of the project can serve the provider of the requested model, so there is nowhere to send the call. In a flow, the same code answers when the pool a model node routes the call through was deleted or is switched off. | Add a connection to that provider in the console, or enable the one you have. Switch the pool back on, or choose another pool in the model node and publish a new version. Then send the request under a new key. |
provider_rate_limit | 429 | ProviderException PHPProviderError Node.js | The provider answered that its rate limit was reached. A pool that switches connections on a rate limit tries another one first; this code reaches you when nothing else was tried. | Send the call again later under a new key. Add a connection to the pool, or let the pool switch connections on a rate limit. |
provider_error | 502 | ProviderException PHPProviderError Node.js | The provider refused the call or answered with something Slen cannot use, and the call did not complete. | Check what the request asks of the model — a parameter the model does not take is refused by the provider. Send the call again under a new key once the request is right. |
provider_timeout | 504 | ProviderException PHPProviderError Node.js | The provider could not be reached — the name did not resolve, or the connection failed — so the call never went out. Despite the name, it does not mean that the model was slow. | Send the call again later under a new key. A provider that was reached and did not answer in time is operation_uncertain, not this code. |
provider_unavailable | 502 | ProviderException PHPProviderError Node.js | The provider answered with a failure on its own side. Slen pauses that connection for a while, and a pool that switches connections tries another one. | Send the call again later under a new key. A pool with more than one connection rides out the outage of one of them. |
pool_exhausted | 503 | ProviderException PHPProviderError Node.js | No connection of the pool could serve the call within the attempts the pool allows. last_error_code in the details of the error names the last failure, and the Retry-After header says how long to wait when that is known. | Wait as long as Retry-After says, then send the call again under a new key. Add connections to the pool if it runs out often. |
operation_uncertain | 504 | OperationUncertainException PHPOperationUncertainError Node.js | The provider was called and its answer did not come back, so it is not known whether the call was made and paid for. A model call of a flow that ran in the background ends the same way when the provider accepted it and could no longer be asked about it. The hold is not given back; it stays until it expires. An execution that ends this way has the status uncertain. | Do not send the call again under a new key — that may be a second paid call. Read the operation or the execution to learn what it did. The webhook event operation.uncertain announces such a call as well. |
ledger_unavailable | 503 | ServiceUnavailableException PHPServiceUnavailableError Node.js | The spend ledger could not be reached when the call asked for its hold. The call was not authorized — nothing was held for it, and its provider was not called. | Send the request again later — a request to a flow under a new key, since its failed execution keeps the key it had. GET /v1/degraded-status says what the API lets through while the ledger is down. |
flow_runtime_error | — | FlowRuntimeException PHPFlowRuntimeError Node.js | The code the runtime keeps for a flow that broke while it was being walked, for a reason it has no narrower code for. No request is answered with it today, and no execution ends with it — a failure of a walk carries a narrower code, or none. | Nothing to handle today. Should an answer carry it, read the trace of the execution to see where it stopped. The model calls made before that were paid for, and a repeat under a new key pays for them again. |
step_limit_exceeded | 500 | FlowRuntimeException PHPFlowRuntimeError Node.js | The walk did not reach a terminal node within the number of steps one walk is allowed. The flow is larger than the runtime walks in one request. | Make the flow shorter, or split the work between two operations. Then send the request under a new key — a repeat under the same key is answered with the failed execution. |
unrouted_port | 500 | FlowRuntimeException PHPFlowRuntimeError Node.js | A node left through a port that nothing is connected to, and the walk had nowhere to go. The message of the error names the node and the port. | Connect that port in the flow builder and publish a new version. Then send the request under a new key — a repeat under the same key is answered with the failed execution. |
execution_timeout | 504 | TimeoutException PHPTimeoutError Node.js | The walk of the flow ran out of the time one walk is given. A model call that had answered before that was paid for. | Read the trace of the execution to see where the time went. Before you repeat the request, mind that a repeat under a new key pays again for what was paid. |
http_request_failed | 502 | FlowRuntimeException PHPFlowRuntimeError Node.js | A call the flow makes to another HTTP API failed or was answered with an error, and nothing is connected to the error port of the node that made it. It is not a model provider. That node is frozen unless the service is set up otherwise — a version already published with it runs, and a new version cannot hold it. | Check the API the flow calls, then send the request under a new key — a repeat under the same key is answered with the failed execution. The error port of a frozen node cannot be connected in a new version — to change what the flow does on this error, publish a version without the node. |
rate_limit_exceeded | 429 | RateLimitException PHPRateLimitError Node.js | The API key, or the person signed in to the console, sent more requests in a minute than the limit allows. A few operations have a smaller limit of their own, such as the check of a provider connection. The Retry-After header of the answer says how many seconds to wait. Reading the status of an execution counts too. | Wait as long as Retry-After says, then send the request again. Nothing was held or spent for the refused request. |
service_unavailable | 503 | ServiceUnavailableException PHPServiceUnavailableError Node.js | Slen could not reach its database and answered before doing anything. The same code answers a change of a budget that waited too long for the calls running on that budget; nothing was changed. | Send the request again later. A refused change of a budget says in Retry-After when. |
background_hold_expired | — | TimeoutException PHPTimeoutError Node.js | Not an answer of the API — it ends an execution started in async mode. A model call of the flow ran in the background at the provider, and its hold was settled by another capture while it waited, so the call ended without asking the provider for its answer. Nothing was given back, and the provider may still bill the call it accepted. Despite the name, a hold that has only expired does not end a call this way. | Send the request again under a new key only if you still need the answer. The provider may bill the first call as well, so the answer may be paid for twice. |
execution_conflict | 500 | FlowRuntimeException PHPFlowRuntimeError Node.js | The execution could not be opened — its record collided with another one, and not on the idempotency key. The flow did not run. | Send the request again. If it happens again, write to support and quote the id of the request. |
unknown_node | 500 | FlowRuntimeException PHPFlowRuntimeError Node.js | The published version of the flow leads to a node the runtime cannot find, so the walk stopped. | Publish the flow again from the flow builder, then send the request under a new key — a repeat under the same key is answered with the failed execution. If a new key meets the error again, write to support and quote the id of the request. |
node_type_not_supported | 500 | FlowRuntimeException PHPFlowRuntimeError Node.js | The published version of the flow has a node of a type the runtime cannot run. | Replace the node in the flow builder and publish a new version. Then send the request under a new key — a repeat under the same key is answered with the failed execution. |
Codes without a type of their own
An SDK has no type of its own for these codes. It raises the type of the status of the answer, by the rule under the table.
| Code | HTTP status | What it means | What to do |
|---|---|---|---|
project_access_restricted | 403 | The caller reaches only some projects of the organization and tried to change something that belongs to the whole organization, or to read the audit log. An API key reaches only the project it belongs to. | With an API key, create the thing in the project of the key — a provider connection with its scope set to project. A person asks a member who reaches every project to make the change. |
customer_has_history | 409 | The customer cannot be deleted, because something already happened to them — an account holds credits or a reservation, or the statement has an entry. The journal of credits is only added to, and its entries explain the balance. | Block the customer instead of deleting them. |
reservation_not_found | 404 | Not an answer of any operation of the API. Slen keeps it for a hold it cannot find while it settles a model call. | Nothing to handle. Should an answer carry it, write to support and quote the id of the request. |
reservation_expired | 409 | Not an answer of any operation of the API. Slen keeps it for the extension of a hold that has expired; an expired hold still takes the capture of its call. | Nothing to handle. Should an answer carry it, write to support and quote the id of the request. |
invalid_request | 409, 422 | The request cannot be carried out as it stands, and the message of the error says why — a policy without the parameter its action needs, or with a condition its action never meets; selected projects for a member whose role reaches every project; an Idempotency-Key longer than 190 characters. The SDKs raise an error with this code themselves for a call they refuse before sending it. | Read the message and change the request. |
idempotency_key_required | 400 | The operation requires an Idempotency-Key header, and the request has none, or an empty one. | Send a key of your own that names the piece of work, and send the same key when you repeat that work. |
invalid_flow_input | 422 | The input does not carry what a node of the flow needs — a flow that calls a model needs a non-empty messages in its input. The execution is closed as failed, and the key stays with it. | Fix the input and send it under a new key. A repeat under the same key is answered with the failed execution. |
execution_parked | — | Not an answer of the API. Inside the runtime it marks a walk that stopped to wait, and the request is answered with the execution, waiting or queued. | Nothing to handle as an error. Wait for the execution as for any other that waits. |
flow_not_found | 404 | No flow answers the operation code — no flow is bound to it, the flow has no published version, or the flow is archived. Nothing is created, so the idempotency key stays free. The same code answers the id of a flow the caller does not reach. | Bind the operation code to a flow and publish the flow. A repeat under the same key runs once the flow can answer. |
operation_not_found | 404 | No operation — the record of one model call with its provider attempts — has this id in the project of the key. | Check the id. An operation of another project answers the same way. |
invalid_credentials | 401, 502 | Two cases. A sign-in to the console whose email and password do not match an account. A model call whose provider refused the key of the connection that served it — Slen then marks the credentials of that connection as invalid. | Sign in with the right password. For a connection, put a valid provider key into it in the console. |
csrf_token_mismatch | 419 | A request of a session of the console came without its CSRF token, or with one that is stale. A request with an API key never gets this code. | Reload the page of the console and do it again. |
not_found | 404 | The sign-up and the sign-in of the console answered as if the address did not exist. They are open only to a browser that has opened the access link it was given. | Open your access link in this browser, then sign up or sign in again. |
flow_execution_not_found | 404 | No execution with this id exists in the projects the caller reaches — it never did, or it belongs to another project. | Check the id. It is execution_id of the answer that started the execution. |
A code with no type of its own is raised as the type of the HTTP status of the answer:
401,403AuthenticationExceptionPHP,AuthenticationErrorNode.js402SpendRefusedExceptionPHP,SpendRefusedErrorNode.js429RateLimitExceptionPHP,RateLimitErrorNode.js- 500 and above
ProviderExceptionPHP,ProviderErrorNode.js - any other status
InvalidRequestExceptionPHP,InvalidRequestErrorNode.js
Codes of the console and the settings
These codes come from the operations of the console and the settings: sign-in and sessions, organizations and projects, members and invitations, keys, policies, budgets, flows and their versions, approvals, alerts, webhooks, connections and pools, the live updates of the console — and invalid_date_range from the lists of the ledger, the holds and the operations. No SDK method calls these operations. The rule under the table is the SDKs' rule for any code without a type of its own.
| Code | HTTP status | What it means | What to do |
|---|---|---|---|
session_required | 403 | Only a person signed in to the console may do this — create an organization, change or remove a member, send, resend or revoke an invitation, connect or change a channel or a route of notifications, or read and change their own notifications. An API key may not. | Do it in the console, signed in as a member whose role allows it. |
member_forbidden | 403 | The role of the person signed in does not allow this change to this member, or the change is to their own membership. Only an owner gives or takes the role of owner, and only an owner or an admin changes or removes a member. | Ask an owner to make the change. To part with an organization yourself, leave it instead. |
channel_forbidden | 403 | The console asked to receive the live updates of a project the caller may not read — another project than the one the key belongs to, or a project the person does not reach. | Switch to a project you reach, then open the page again. |
budget_not_found | 404 | No budget with this id exists in the projects the caller reaches — it never did, or it belongs to another project. | Check the id. List the budgets to find the one you need; an archived budget is listed with include_archived set to 1. |
invalid_date_range | 422 | The window of a list of the ledger, the holds or the operations is not one it reads. The two ends come together or not at all, the end may not be earlier than the start, the window is at most seven days, and each end is a moment the list can parse. | Send from and to together, the end after the start, at most seven days apart — or send neither and read the last seven days. To read a longer period, move the window. |
flow_invalid | 422 | The graph of the flow has errors, so it cannot become the version that runs. A publish found them in the draft, or a rollback found that the version it would go back to names a model or a pool that is gone. The details of the error list each issue with its code and the node it is about. | Fix each error of the list in the flow builder and publish again. Warnings do not stop a publish. For a rollback, choose another version, or publish a draft that no longer names what is gone. |
flow_draft_not_found | 404 | The flow has no draft to publish — it was published and not edited since. A check of a flow that has neither a draft nor a published version answers the same. | Edit the flow to start a new draft, then publish it. Nothing has to be published to go on running the version that runs now. |
flow_slug_taken | 409 | Another flow was being created in the same project at the same moment and took the same short name. The flow was not created. | Create the flow again. A name the project already uses gets a number at the end of its short name. |
approval_not_found | 404 | No request for approval with this id exists in the projects the caller reaches — it never did, or it belongs to another project. | Check the id. List the requests for approval of the project to find the one you need. |
alert_not_found | 404 | No alert with this id exists in the projects the caller reaches — it never did, or it belongs to another project. | Check the id. Read the feed of alerts to find the one you need. |
alert_rule_not_found | 404 | No alert rule with this id exists in the projects the caller reaches — it never did, it was deleted, or it belongs to another project. | Check the id. The rules are listed on the Rules tab of the alerts page. |
alert_rule_unknown_setting | 422 | The settings of an alert rule name a setting its type does not have. The message names the settings the type takes. | Send only the settings the message names for that type. |
api_key_not_found | 404 | No API key with this id exists in the projects the caller reaches — it never did, or it belongs to another project. A key that was revoked cannot be rotated, and answers the same. | Check the id on the keys page of the console. To replace a revoked key, issue a new one. |
invite_not_found | 404 | No invitation answers this link or this id. The link may be mistyped, or the invitation may belong to another organization. | Open the link exactly as it came in the email, or ask for a new invitation. |
invite_not_pending | 410 | The invitation exists and is no longer open — it was accepted, declined or revoked, or its time ran out. | Ask an owner or an admin of the organization to invite you again. |
invite_email_mismatch | 403 | The invitation was sent to another email address than that of the account signed in. | Sign in with the account of the address the invitation was sent to, or ask for an invitation to your own address. |
email_not_verified | 403 | The account has not confirmed its email address yet, so it cannot accept an invitation or connect Telegram for notifications. | Open the confirmation link that was sent to the address, then open the invitation or connect Telegram again. |
invite_forbidden | 403 | The person signed in may not manage this invitation. Only an owner or an admin invites, and only an owner invites, resends or revokes an invitation to the role of owner. An API key manages no invitations. | Ask an owner, or an admin for a role below owner, to send or change the invitation. |
member_not_found | 404 | No member with this id exists in the organization — they may have left or been removed. | Read the list of members again and use the id it gives. |
last_owner | 409 | The change would leave the organization without an owner. An organization keeps at least one. | Make another member an owner first, then change the role of this one, remove them or leave. |
organization_not_found | 404 | The organization does not exist, or the person signed in is not a member of it. A request that names another organization than that of the key is answered the same. | Check the id, and switch to an organization you are a member of. |
organization_limit_reached | 409 | The person already owns as many organizations as one person may own — twenty, unless the service is set up otherwise. | Make another member the owner of an organization you no longer need and leave it, then create the new one. |
project_not_found | 404 | No project with this id exists in the organization, or the caller does not reach it. | Check the id. List the projects of the organization to find one you reach. |
project_required | 422 | The organization has no project yet, and the request needs one to work in. | Create a project in the organization, then do it again. |
policy_not_found | 404 | No policy with this id exists in the projects the caller reaches — it never did, it was deleted, or it belongs to another project. | Check the id. Read the list of policies to find the one you need. |
provider_connection_not_found | 404 | No provider connection with this id exists in the projects the caller reaches — it never did, or it belongs to another project. A pool refuses to take such a connection with the same code. | Check the id. List the connections, and for a pool choose one of your project or of the whole organization. |
provider_pool_not_found | 404 | No provider pool with this id exists in the projects the caller reaches — it never did, or it belongs to another project. | Check the id. List the pools to find the one you need. |
webhook_endpoint_not_found | 404 | No webhook with this id exists in the organization, or it belongs to a project the caller does not reach. | Check the id on the webhooks page of the console. |
webhook_url_not_allowed | 422 | Slen will not deliver to this address. A webhook needs an https address on port 443, with a host name rather than an IP address, and without a login or password, and its host may not lead into a private network. | Give a public https address of your service. A host whose name does not resolve yet is accepted, since every delivery resolves it again. |
email_already_registered | 409 | An account with this email address already exists, so no new account was made. | Sign in with that address, or reset its password if you have forgotten it. |
invalid_token | 422 | The link to confirm an email address or to set a new password is wrong, was already used, or has run out. | Ask for a new link and open it as it comes in the email. |
too_many_attempts | 429 | Too many attempts to sign in or to set a new password failed in a short time, for this account or from this network address, so attempts are refused for a while. | Wait for the time the Retry-After header says, then try again with the right password — or set a new one. |
oauth_failed | 422 | Signing in with Google could not be completed. The attempt took too long or could not be verified, or Google has not verified the address it would link to an account that already exists. | Start the sign-in with Google again. If Google has not verified the address, sign in with the password of the account. |
flow_version_not_found | 404 | The flow has no version with this number. | List the versions of the flow and use a number it gives. |
flow_version_not_published | 409 | The version named is a draft. Only a version that was published can run again. | Name a published version, or publish the draft instead. |
no_previous_version | 409 | A rollback without a version number goes to the published version just below the one that runs, and there is none — the flow is at its first version, or no version of it runs. | Name the version to go to, or publish a new one. |
draft_conflict | 409 | The draft is no longer the one the request was made for. Somebody saved it in between, or published it and began a new one — or, during a publish, a save or another publish landed while it was prepared. Nothing was written and nothing was published. | Read the draft again, apply your change to it and send the request again with the numbers it now has. |
operation_already_bound | 409 | Another flow of the project already answers to this operation code. A flow answers to one code and a code leads to one flow; this flow keeps the code it had. | Remove the code from the other flow first, or choose another code. |
approval_expired | 409 | The request for approval can no longer be decided. Its time ran out, and it is now closed as if nobody had decided — or its execution has ended and no longer waits. | Nothing waits for the decision any more. Open the execution to see how it ended, and send the request to the flow again under a new key if the work is still needed. |
approval_already_decided | 409 | The request for approval is no longer pending — somebody decided it first, or it expired. | Read the request again to see its verdict and who gave it. |
connection_in_use | 409 | The provider connection is the last enabled connection of a pool, so deleting it would leave the pool with nothing to call. | Add another connection to the pool, or enable one, then delete this one. Or delete the pool first. |
pool_in_use | 409 | A flow still calls through this pool — the version of the flow that runs names it, or an execution that has not finished runs on a version that does. The pool was not deleted. | Publish versions of those flows that name another pool, let the executions finish, then delete the pool. |
pool_connection_exists | 409 | The connection is already a member of this pool. | Change the terms of the member instead — its priority, weight, cost multiplier or whether it is enabled. |
pool_connection_not_found | 404 | The connection is not a member of this pool. | Read the pool to see its members, or attach the connection first. |
connection_incompatible | 422 | The connection cannot join this pool. It is of another provider than the pool, and the pool does not take connections of other providers — or the connection was deleted. | Choose a connection of the provider of the pool, or let the pool take connections of other providers. |
unsupported_pool_strategy | 422 | A model call went through a pool whose strategy Slen does not carry out. The API never accepts such a strategy; the pool was given it by other means. | Set the strategy of the pool to priority, least_utilized or weighted, then send the request again under a new key — the call that met this code has ended. |
already_a_member | 409 | The person with this email address is already a member of the organization, so no invitation was sent. | Change the role of the member instead, if that is what was meant. |
invite_already_pending | 409 | An invitation to this email address is already open in the organization. | Resend the open invitation, or revoke it and invite again. |
invite_limit_reached | 429 | Too many invitation emails went out in a short time — an organization sends at most 50 a day and one person at most 20 an hour, new invitations and resends together, unless the service is set up otherwise — so this one is refused for a while. | Wait for the time the Retry-After header says, then invite or resend again. The invitations already sent stay open meanwhile. |
user_session_not_found | 404 | No active session with this id belongs to the person signed in. It may have ended or been signed out already. | Read the list of your sessions again. A session that is gone needs nothing more. |
notification_channel_not_found | 404 | No notification channel with this id exists in the organization, or it belongs to a project the caller does not reach. A personal channel of another person is not found either. | Check the id in the list of the channels of the team, or in the list of your own channels. |
notification_route_not_found | 404 | No notification route with this id exists in the organization, or it belongs to a project the caller does not reach. A route is also deleted when its last recipient leaves the organization, and some time after the alert rule it is bound to is removed. | Read the list of routes again. |
notification_subscription_not_found | 404 | No subscription with this id belongs to the person signed in, in this organization. A subscription is its member's alone, and that of another member is not found. | Read the list of your subscriptions again. |
notification_channel_url_not_allowed | 422 | Slen will not send notifications to this address. The address of a channel has to be a webhook of the service the channel is of — a Slack address on hooks.slack.com under /services/, a Discord webhook address, or the address of a Teams workflow, of Azure Logic Apps or Power Automate, with /workflows/ in its path. The address of a retired Office 365 connector is refused, and so is an address that is not https on port 443, carries a login or password, names an IP address or leads into a private network. A Telegram group takes no address at all. The details of the error name the case. | Copy the address from the service again and paste it whole. For Microsoft Teams, make a workflow of the channel, not a connector. |
notification_channel_kind_unavailable | 422 | This installation of Slen offers no Telegram, because no Telegram bot is set up for it. | Use Slack, Microsoft Teams, Discord or email instead, or ask whoever runs the installation to set up the bot. |
notification_channel_state_invalid | 409 | The channel is not in the state this action needs. A chat is confirmed only while it waits for confirmation, and only by the person who got its link. A test goes only to an active channel. A channel that waits for its link is switched on by confirming the chat, not by a change of its status. An account has one Telegram chat, so a second one is not connected while the first is on or paused. | Read the channel again and act on its state. Confirm a chat as the person who got the link, resume a paused channel before a test, or disconnect your Telegram before you connect another. |
notification_link_expired | 410 | The link that connects a Telegram chat ran out before a chat took it. A link works for 15 minutes, unless the service is set up otherwise. | For a group of the team, delete the channel and connect the group again with a new link. For your own chat, connect Telegram again among your notifications, and a new link comes for the same channel. |
notification_limit_reached | 409 | The organization has as many notification channels or routes as it may have, or the member as many subscriptions in it — 20 channels and 50 routes for an organization and 20 subscriptions for a member, unless the service is set up otherwise. | Delete a channel, a route or a subscription that is no longer needed, then try again. |
notification_event_not_allowed | 422 | A route or a subscription names an event people cannot be told about, or a recipient whose role does not read the event in the console. A viewer does not see approvals, so no route or subscription brings a viewer an approval. | Name only alerts and approvals among the events, and leave a viewer out of a route that carries approvals. |
notification_unsubscribe_invalid | 404 | The link to unsubscribe from notification emails is not one Slen made. It was cut short or changed on the way. | Open the link from the email again, whole, or turn the emails off among your notifications in the console. |
A code with no type of its own is raised as the type of the HTTP status of the answer:
401,403AuthenticationExceptionPHP,AuthenticationErrorNode.js402SpendRefusedExceptionPHP,SpendRefusedErrorNode.js429RateLimitExceptionPHP,RateLimitErrorNode.js- 500 and above
ProviderExceptionPHP,ProviderErrorNode.js - any other status
InvalidRequestExceptionPHP,InvalidRequestErrorNode.js
The code an execution ends with
An execution that did not complete keeps a code in error_code, and error_message says the same in a sentence. A status read, a wait and a repeat of the request under its key read the two. Most of these codes are codes of this page: the code of the error the request was answered with. Two kinds are not.
A Reject Request node ends the execution with the code and the message it is set up with. A node set up with neither ends it like this:
{
"status": "rejected",
"error_code": "rejected_by_flow",
"error_message": "The request was rejected by the flow"
}The runtime closes an execution it can no longer walk with a code of its own: its worker stopped, it waited longer than an execution may wait, its state could not be stored or read. error_message says what happened. An execution that waited too long ends like this:
{
"status": "failed",
"error_code": "parked_expired",
"error_message": "The execution waited longer than a parked execution may and was closed"
}An execution closed by an error the API has no code for has neither: error_code and error_message are null.
Where to go next
Overview — the fields of the envelope and the answers that come without it.
Authentication — the refusals of a key and its scopes.
Handling errors — catch the errors in the SDK, and tell whether a call cost money.
Async runs and waiting — how to read the way an execution ended.
Executions — the status and the code an execution ended with, read over HTTP.
When the outcome is unknown — what to do after
operation_uncertain.
Built from openapi b070e1f, sdk contract 6a2e0e0, php 4089db3, node 0fa87be