> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/authentication/authentication-factors/biometric-device-selfie-id/integration-methods/selfie-id-api/api/error-scenarios.md).

# Error Scenarios

In case the end user cannot complete challenge (step 5 in [Authentication workflow](/identity-stack/authentication/introduction/authentication-workflow.md)) on the first try, VIDA Authentication server responds (step 7 in [Authentication workflow](/identity-stack/authentication/introduction/authentication-workflow.md)) with a new, updated challenge along with a new bearer token that shall be used to perform provisioning/authentication and submit challenge response (step 5 in [Authentication workflow](/identity-stack/authentication/introduction/authentication-workflow.md)) again. This will enable the client to resume authentication in case of an inadvertent failure

### Error Codes

<table><thead><tr><th width="139">HTTP Code</th><th width="233.855224609375">Error Msg</th><th>Error Description</th></tr></thead><tbody><tr><td>400</td><td>invalid_request</td><td>message=Invalid client id</td></tr><tr><td>400</td><td>invalid_request</td><td>message=Missing client id</td></tr><tr><td>400</td><td>invalid_request</td><td>message=Invalid or expired bearer token</td></tr><tr><td>401</td><td>unauthorized_client</td><td>message=Unauthorized client</td></tr><tr><td>401</td><td>access_denied</td><td>message=Bad request. Missing or invalid parameter: type</td></tr><tr><td>401</td><td>access_denied</td><td>message=Bad request. Missing or invalid parameter: template_url</td></tr><tr><td>401</td><td>access_denied</td><td>message=Bad request. Missing or invalid parameter: image</td></tr><tr><td>401</td><td>access_denied</td><td>code=1039;message=connection pool shutdown</td></tr><tr><td>401</td><td>Selfie photo does not match with reference photo</td><td>code=1040;message=Selfie photo does not match with reference photo;livelinessScore=0.103826;faceMatchScore=0.396705</td></tr><tr><td>401</td><td>access_denied</td><td>code=21004;message=Unprocessable Entity</td></tr><tr><td>401</td><td>access_denied</td><td>code=1051;message=Face Occluded</td></tr><tr><td>401</td><td>access_denied</td><td>code=1055;message=No face detected</td></tr><tr><td>401</td><td>access_denied </td><td>code=1056;message=JPEG decoding error</td></tr><tr><td>401</td><td>access_denied</td><td>code=1006;message=invalid id</td></tr><tr><td>401</td><td>access_denied</td><td>code=1602;message=Transaction Not Found</td></tr><tr><td>401</td><td>access_denied</td><td>code=1603;message=Could not fetch the scores for given transaction</td></tr><tr><td>401</td><td>access_denied</td><td>code=1604;message=Image not found for given transaction</td></tr><tr><td>404</td><td>Realm does not exist</td><td></td></tr></tbody></table>
