Skip to main content

Errors & Troubleshooting

Start here

SymptomFirst check
The tool asks for confirmationConfirm deliberately — see Confirmations & Spend Safety
You are asked to sign in againRe-authenticate; if it repeats immediately, check Agent Access
Permission deniedThe connecting user's Orders permissions
Too many changes too quicklyWait briefly, then retry
A purchase is refused over moneyWallet balance and the agent spend limit
A status change is refusedOrder Statuses
The Label is not readyWait and ask for the Label again
A Label purchase is already in progressWait, then read the current Label state
Something failed unexpectedlyRead the current state before repeating any change

Two ways a call can fail

The connection or authorization failed, and no tool ran. Nothing in Mailhub was attempted. Sign-in, Agent Access, and OAuth failures land here.

A tool ran and returned a refusal. The call itself succeeded at the protocol level and the payload carries an errors array. Everything else on this page is this second kind.

A successful call returns the tool's own data. A refusal returns an error envelope:

{
"errors": [
{
"code": "MCP_INVALID_UUID",
"message": "..."
}
]
}
  • code is the machine-readable part. Branch on it.
  • message is the human-readable part. It often carries the specific detail — which field was missing, which statuses are reachable, which status an Order should resume to.
  • errors can hold more than one entry. Read them all; the first is not guaranteed to be the only problem.

Input and confirmation errors

CodeMeaningRetry?What to do
MCP_CONFIRMATION_REQUIREDA changing tool was called without confirmationYes, after deliberately confirmingReview the change, then call again with confirm as the JSON boolean true
MCP_INVALID_UUIDAn identifier is not a valid UUIDNot with the same valueLook the Order, Shipment, or Label up again and use the identifier Mailhub returned
MCP_MISSING_FIELDA required field is missing or blankAfter fixing the inputSupply the field the message names
MCP_INVALID_VALUEA value is outside the accepted setAfter correcting the valueUse one of the names the message lists — for statuses, see Order Statuses

The confirmation rule is exact: only the JSON boolean true confirms a change. See Confirmations & Spend Safety.

Authentication, Agent Access, and permissions

You are asked to authenticate again

Some failures surface as a re-authentication request rather than as a tool error. Re-authenticating the connector is the right first move.

CodeMeaningRetry?What to do
MCP_ACCOUNT_UNRESOLVEDMailhub cannot resolve the account a changing call belongs toAfter re-authenticatingReconnect and authorize again; if it persists, contact Developer Support

Permission denied

Permission failures come back through the Mailhub error envelope rather than under an MCP_-prefixed code. Check what the connecting user actually holds:

  • Listing Orders, reading one, and getting a Label link need view access to Orders.
  • Getting Rates needs update access, even though it changes nothing.
  • Creating, changing status, buying, and cancelling need update access.

Agent Access is a separate account-level gate on top of those permissions — having the permission is not enough if the account has agents switched off.

Not found, or not yours

A resource that does not exist and a resource your account may not see are answered the same way. Mailhub does not reveal that something exists in another account. Re-read the identifier from mailhub_list_orders or mailhub_get_order before assuming it is a bug.

Rate and spend controls

CodeMeaningRetry?What to do
MCP_WRITE_RATE_LIMITEDThe account hit the guard on changing MCP callsYes, after a short waitSlow down and retry shortly
Wallet.InsufficientFundsThe wallet balance does not cover the purchaseOnly once the wallet is fundedFund the account in Mailhub — MCP has no top-up tool
Wallet.McpSpendCapExceededThe purchase would exceed the rolling 24-hour agent spend limitNot immediatelyWait for older spend to leave the window, or have an authorized account user change the limit
Wallet.DebitFailedThe wallet debit could not complete, typically because the balance changed at the same momentYes, once you have checked the stateRe-read the Order and Label state first, then decide whether the purchase still needs to be made

Mailhub currently targets a guard of about 10 changing MCP calls per minute per account; it is a request-rate guard, not a spend quota. An assistant cannot raise its own spend limit. Both controls are covered in Confirmations & Spend Safety.

Order and status errors

Every refused status change returns one code:

CodeMeaningRetry?What to do
Order.StatusTransitionNotAllowedThe status change was refusedOnly with a target the Order acceptsRead the message — it says which case this is and what to do next
The message saysRetry?What to do
The Order is already in that statusNoNothing to do — carry on from the current status
The transition is not allowed, and names the statuses the Order can move toOnly with one of those targetsPick a status the message lists
LabelCreated is set when a Label is purchasedNot as a status updateBuy a Label with mailhub_buy_label — that is what sets it
An Order with a purchased Label returns to Packed only by cancelling that LabelNoCancel the Label instead — that is what returns the Order
The Order cannot be cancelled directly; cancel its Label firstNot until the Label is goneCancel the Label, let the Order return to Packed, then cancel the Order
A draft Order's status cannot be set directlyNoLeave Draft alone; saving or buying is what moves a draft on
The Order was put on hold from a named status — resume it to that oneOnly with that targetResume to the status the message names

Order Statuses has the full model behind every one of these.

Order detail errors

CodeMeaningRetry?What to do
MCP_ORDER_DETAILS_UNAVAILABLEMailhub cannot resolve usable Shipment detail for that OrderNot by repeating the same callCheck the Order identifier with mailhub_list_orders; the Order may be a Draft or may have no Shipment to read
MCP_ORDER_DETAILS_UNREADABLEMailhub could not read the Order detail needed for the Label linkOnceTry once more; if it persists, contact Developer Support

Label purchase conflicts

Two different families refuse a purchase. The Order's state refuses under Order.*; a competing purchase refuses under LabelPurchase.*.

The Order's state:

CodeMeaningRetry?What to do
Order.LabelPurchaseBlockedByHoldThe Order is on holdAfter resuming the OrderResume the Order to the status the message names, then buy
Order.LabelPurchaseBlockedByFulfilmentThe Order was already handed to the carrierNoA fulfilled Order does not take a new Label
Order.LabelPurchaseBlockedByReturnThe Order has been returnedNoA returned Order does not take a new Label
Order.CarrierSelectionNotAllowedThe Order is cancelled, so no carrier can be selected for itNoNothing is buyable on a cancelled Order
Order.LabelAlreadyPurchasedThe Order already holds a LabelNot until that Label is goneCancel the existing Label first if it is being replaced

A competing purchase on the same Shipment:

CodeMeaningRetry?What to do
LabelPurchase.InProgressA different Label purchase is already running for that ShipmentOnly after it settlesWait, then read the Order and Label state before starting anything else
LabelPurchase.OutcomeUnresolvedMailhub is still resolving an uncertain carrier outcomeLater, not immediatelyWait, then check the Order and Label state
LabelPurchase.ConcurrentAdmissionTwo purchase attempts raced each otherYesFirst check whether one of them became active or completed, then retry if a Label is still needed
LabelPurchase.LabelCancelledThe Label bought by this request was cancelled before its result came backNo — terminal for that purchaseIf a Label is still needed, start a fresh Rates and purchase workflow deliberately

Repeating the same Shipment and Rate is safe and will not buy a second Label. That protection covers Label purchase only — it does not make the other changing tools safe to repeat. See Working with Labels.

Label readiness errors

CodeMeaningRetry?What to do
MCP_LABEL_NOT_READYThe Label file is still being generatedYes — the normal waitWait a few seconds and request the Label link again
MCP_LABEL_NOT_PURCHASEDNo Label has been bought for that ShipmentOnly after buyingGet Rates and buy a Label first
MCP_LABEL_CANCELLEDThe Label was cancelledNo — terminal for that LabelBuy a new Label if one is still needed
MCP_LABEL_ERRORThe Label failed during generationNo — waiting does not helpBuy a new Label for the Shipment; contact Developer Support if it keeps failing
Label.AssetsUnavailableThe Label was bought, but its file cannot be producedNo — repeated attempts are not expected to fix itDo not buy another Label; contact Developer Support with the Order and Shipment

MCP_LABEL_NOT_READY is the one worth retrying. The others describe a Label that will never become downloadable, so repeating the request only delays the purchase that is actually needed.

Label.AssetsUnavailable is different again: the purchase succeeded and the money was spent, so buying a replacement is the wrong move — the Label needs recovering, not repurchasing.

OAuth authorization errors

These appear while connecting, before any tool runs.

ErrorMeaningWhat to do
access_deniedAuthorization was declinedStart authorization again only if access is actually intended
insufficient_scopeThe authorization does not carry the scope MCP needsThe required scope is mcp.tools; use the registered Mailhub MCP client configuration
invalid_redirect_uriThe client's callback is not one Mailhub accepts for this clientDo not guess another callback — use a Mailhub-supported client, and contact Developer Support if it should be supported
invalid_targetThe MCP resource requested does not match what the client is registered forCheck that the supported client is pointed at the right Mailhub environment; contact Developer Support if it persists
invalid_requestThe client's request does not match its allowed OAuth configurationUse the supported client setup; contact Developer Support
unsupported_grant_typeThe client tried a grant Mailhub MCP does not supportMailhub supports Authorization Code, with Refresh Token for renewal

Authentication covers the flow these belong to.

Temporary and unexpected failures

A call can also fail without a business reason — a timeout, or a response Mailhub could not return properly. These arrive under their own codes:

CodeMeaningRetry?What to do
MCP_MALFORMED_ENVELOPEMailhub's response could not be readA read, yes; a change, only after checking stateThe message says only that the response was empty or unreadable — there is no business detail to act on
MCP_UNKNOWN_ERRORMailhub reported a failure but named no reasonA read, yes; a change, only after checking stateRead the current state before repeating anything that changes data

Neither carries a specific cause. Treat them by what the call was doing:

  • A read can simply be retried after a short wait.
  • A change must not be blindly repeated. Read the current state first, then decide.

What "read the state first" means per tool:

After an uncertain…Do this before anything else
mailhub_create_orderList Orders and look for the one you may have created
mailhub_update_order_statusRead the Order — a repeat that already applied is refused as already in that status
mailhub_buy_labelCheck the Order and Label state; repeating the same purchase is safe, starting a different one is not
mailhub_cancel_labelRe-read the Order and Label; repeating a cancellation is safe

If an unexpected failure repeats, contact Developer Support rather than retrying indefinitely.

Next

If a failure persists after the action its row names, raise it through the support arrangement in place for your account — Developer Support explains what to include.