How Hub reports errors
Where errors appear, how to read them, and what you need enabled to see them.
This page explains where Hub's errors reach you, and how to read them. How much detail you receive depends on your client configuration: the standard behaviour comes first, then the optional detailed reporting.
Where errors arrive
When a verification doesn't complete, Hub sends the user back to your redirect_uri exactly as it would on success, but with error and error_description instead of a code.
sequenceDiagram
participant U as User
participant RP as Your app
participant H as Hub
RP->>U: Redirect to Hub (Step 2)
U->>H: Verifies, cancels or runs out of time
alt Verification completed
H->>U: Redirect back
U->>RP: redirect_uri?code=…&state=…
else Didn't complete
H->>U: Redirect back
U->>RP: redirect_uri?error=…&error_description=…&state=…
end
Hub doesn't call your server to report an error. The user's browser brings it to your redirect_uri, the same way it brings a successful result.
Where else errors can appear
| When | Where you see it | How it arrives |
|---|---|---|
| During verification (cancel, timeout, didn't pass) | Your redirect_uri | Query parameters on the redirect. Most errors arrive here. |
| Starting a verification, if your request is wrong | Your redirect_uri, or the response to your PAR request | Query parameters, or a 400 response |
Hub can't identify your client or redirect_uri | A Hub error page | Nothing reaches you. See Nothing arrives at your callback at all. |
| Token exchange (Step 4) | The response to your POST | An HTTP error with a JSON body |
| Retrieving claims (Step 5) | The response to your GET | An HTTP error, for example 401 |
The rest of this page is about errors on the redirect. For token and userinfo errors, see Error reference.
The standard error response
Every client gets this:
https://acme-widgets.example.com/callback
?error=access_denied
&error_description=Document+R
&state=5de789881cc944a78e9c1c9d947f7867
&locale=en-CA
error and error_description are always returned together. You will always be told something about what went wrong.
| Parameter | What it is | Always present |
|---|---|---|
error | The OAuth error code | Yes |
error_description | What went wrong | Yes |
state | The value you sent | Yes |
locale | The language the user was using | Usually |
cid | Correlation ID | Only with detailed error reporting |
Checkstateon error responses, not just successful ones. See Step 3.
Log state for every verification
state for every verification
stateis your fastest route to support.It's the one identifier every client has for every verification, and it's what Interac support uses to find and trace a specific transaction.
You generate state yourself, and Hub returns it on every response, successful or not. Hub also records it the moment your request arrives, before the user sees anything. So even if a verification stops at the very first screen, support can still find it from your state.
- Store it against the user's session and your own request ID.
- Log it for every verification, not just the ones that fail.
- Include it in every support request.
See Getting help for what else to send.
Two kinds of error
The difference matters, because they behave differently.
Request errors — your request was wrong
These happen before the user sees anything, and come from the OAuth layer. They always carry a descriptive error_description.
?error=invalid_scope
&error_description=The+requested+scope+is+invalid%2C+unknown%2C+or+malformed.
&state=5de789881cc944a78e9c1c9d947f7867
error | Cause | Fix |
|---|---|---|
invalid_scope | Scope not configured, or openid missing | Scopes |
invalid_request | Missing or malformed parameter | Starting a verification |
invalid_client | Signature validation failed | Signing keys and JWKS |
You'll meet these during development. They're self-explanatory and you can fix them from the description alone.
Flow errors — the verification didn't complete
The user reached Hub but didn't finish: they cancelled, timed out, or didn't pass.
?error=access_denied
&error_description=Document+R
&state=5de789881cc944a78e9c1c9d947f7867
error is usually access_denied for all of these. The error_description is what tells them apart, so branch on that, not on error.
One exception: a session timeout returnserror=session_expired, notaccess_denied. Handle it explicitly or it falls through your catch-all.
Some descriptions are specific to the verification method — bank verification, document verification and dual mode each have their own. The full list is in the Error reference.
error_descriptionis URL-encoded in the URL, soDocument+RmeansDocument R. Most web frameworks decode query parameters for you. If you read the raw URL yourself, decode it before comparing.
Designing for the standard response
You'll know what happened. What you won't have, without detailed reporting, is the diagnostic depth: no correlation ID for support, no match score, no list of document fraud flags.
Branch on error_description, not error. Nearly every flow failure arrives as access_denied.
Don't alert on ordinary outcomes. Cancellations and timeouts are users behaving normally. Alerting on them produces constant noise.
Decide your retry policy per outcome. A poor-quality document scan is worth retrying. A user who cancelled deliberately may need a different path. A rejected document may be a decline.
Track your completion rate. A drop in the proportion of verifications returning a code is a strong early signal that something has broken.
Detailed error reporting
Some clients are configured for granular error reporting. This adds:
- A correlation ID (
cid) for support enquiries - A structured
error_descriptionusing a parseableerr/details/stagegrammar - Access to the Auth Report API, for match scores and document fraud flags
?error=access_denied
&error_description=err%3Auser_cancelled%24details%3Acancelled_on_landing_page%24stage%3Asharing_init
&cid=e661b5a0-4f33-4738-b6a0-0274bb455370
&state=5de789881cc944a78e9c1c9d947f7867
AvailabilityDetailed error reporting is an optional capability, enabled per client and subject to commercial agreement. It is most commonly used with the verified credentials flow. Speak to your Interac representative if your use case requires it.
It also changes some values. A session timeout returnserror=session_expiredon a standard client, buterror=access_deniedwitherror_description=err:session_timeouton a client with detailed reporting. Don't assume both behave identically.
Reading the structured error_description
error_descriptionIt's URL-encoded in the URL. Most web frameworks decode query parameters for you. Decoded, it reads:
err:user_cancelled$details:cancelled_on_landing_page$stage:sharing_init
Three parts, separated by $, each a key:value pair:
| Key | Meaning | Always present? |
|---|---|---|
err | What went wrong | Yes |
details | A more specific reason | No |
stage | Where in the flow it happened | No |
When present, the parts always appear in this order: err, then details, then stage.
So this one reads: the user cancelled, on the landing page, at the start of the flow.
Parsing it
def parse_error(error_description):
parts = {}
for pair in error_description.split("$"):
key, sep, value = pair.partition(":")
if sep:
parts[key] = value
return parts
parse_error(request.args["error_description"])
# {'err': 'user_cancelled', 'details': 'cancelled_on_landing_page',
# 'stage': 'sharing_init'}function parseError(errorDescription) {
const parts = {};
for (const pair of errorDescription.split("$")) {
const i = pair.indexOf(":");
if (i !== -1) parts[pair.slice(0, i)] = pair.slice(i + 1);
}
return parts;
}
parseError(req.query.error_description);
// { err: 'user_cancelled', details: 'cancelled_on_landing_page',
// stage: 'sharing_init' }static Map<String, String> parseError(String errorDescription) {
Map<String, String> parts = new HashMap<>();
for (String pair : errorDescription.split("\\$")) {
int i = pair.indexOf(':');
if (i != -1) parts.put(pair.substring(0, i), pair.substring(i + 1));
}
return parts;
}
parseError(ctx.queryParam("error_description"));
// {err=user_cancelled, details=cancelled_on_landing_page, stage=sharing_init}static Dictionary<string, string> ParseError(string errorDescription)
{
var parts = new Dictionary<string, string>();
foreach (var pair in errorDescription.Split('$'))
{
var i = pair.IndexOf(':');
if (i != -1) parts[pair[..i]] = pair[(i + 1)..];
}
return parts;
}
ParseError(ctx.Request.Query["error_description"].ToString());
// [err, user_cancelled], [details, cancelled_on_landing_page], [stage, sharing_init]Branch on err — it's the stable part. Treat details and stage as extra context, and don't assume either is present.
Expect values you haven't seen. In the verified credentials flow, errors are reported by the Interac verification app and passed through by Hub unchanged, so new values can appear at any time. Always have a default branch.
The full list of values is in the Detailed error reference.
If you have it, log the cid
cidStore it against the user's session for every verification, successful or not, alongside the state you generated. It's what Interac support uses to trace a specific transaction.
Categorising flow errors
With detailed reporting, roughly half of what arrives isn't a failure at all:
| Category | Examples | Suggested handling |
|---|---|---|
| User chose to stop | user_cancelled, no_consent | Offer to start again. Don't log as an error. |
| User ran out of time | session_timeout | Offer to start again. |
| Verification didn't pass | document_rejected, document_suspected, idv_data_matching_failed | Apply your policy: retry, another way to verify, or decline. |
| Something broke | system_error, wallet_error | Retry later. Log the cid. |
Nothing arrives at your callback at all
If your redirect_uri is invalid or unregistered, Hub can't safely redirect to it. The user sees an error page on Hub instead, and your application is never called.
No callback at all usually means aredirect_uriproblem, not an error-handling problem. See Troubleshooting.
Next
- Error reference — the values every client receives
- Detailed error reference — values returned with detailed reporting
- Auth Report API — scores and fraud flags
- Troubleshooting — start here if something specific is broken
Updated 3 days ago