Error Messages

Brick uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx range indicate an error with Brick’s servers (these are rare).

Error Object

📘

Always verify the response body

The return of the request will show the reason why it was not allowed by Brick's servers.

The erros inside Brick API will always be returned with the following schema:

{
  "code": "<UPPER_CASE_STRING>",
  "message": "Human readable string"
}

The response body, as we saw at the Standard Returns section, will always return the same schema. Therefore, every request to Brick API will receive a list of Errors Objects as return. It can be empty or it can have values.

{
	"data": null,
  "status": 400,
  "errors": [
    {
      "code": "RECORD_MISSING_DOCUMENT",
      "message": "Document not found!"
    },
    {
    	"code": "RECORD_MISSING_ENTITY_TYPE",
      "message": "Entity type is required when creating a Record. It must be PF/PJ"
    }
  ]
}

Standard Errors

4xx Client Error

StatusCodeDescription
400it will vary a lotThe server will not process the request due to an erro inside the customer request
401UNAUTHORIZEDThe servir did not allowed the request. Bearer Token invalid.
403FORBIDDENThe server did not allowed the request. The Bearer Token did not had permissions to perform that action.
404NOT_FOUNDThe server did not found the resource

5xx Server Error

StatusCodeDescription
500INTERNAL_SERVER_ERRORAn unexpected error occurred

Brick API has a system to monitor 500 status code errors.


Specific Errors

Create Record Errors

CodigoMotivo
USER_NOT_FOUNDUsuário não encontrado
DOCUMENT_NOT_FOUNDDocumento não encontrado
ENTITY_TYPE_NOT_FOUNDTipo de entidade não encontrado
BUNDLES_NOT_FOUNDBundles não encontrados
CREDIT_VARIANT_NOT_FOUNDVariante de crédito não encontrada
ORIGIN_NOT_FOUNDOrigem não encontrada
FACIAL_BIOMETRY_NOT_ALLOWED_FOR_PJBiometria facial não permitida para PJ
CNH_NR_NOT_FOUNDCNH não encontrada
FACIAL_BIOMETRY_METHOD_NOT_FOUNDMétodo de biometria facial não encontrado
PHOTO_NOT_FOUNDFoto não encontrada
PDF_NOT_SUPPORTEDPDF não suportado
LIVENESS_METHOD_SHOULD_BE_LINKMétodo de biometria com liveness deve ser LINK
NIS_NOT_FOUNDNIS não encontrado
INVALID_FACE_AMOUNTQuantidade de faces inválida
FACE_OCCLUDEDFace oculta
FACE_TOO_DARKFace muito escura
FACE_DETECTION_FAILEDFalha na detecção de face
FAILED_TO_CROP_IMAGEFalha ao cortar imagem
FAILED_TO_SAVE_RECORDFalha ao salvar cadastro
FAILED_TO_TRIGGER_ANALYSESFalha ao disparar análises
PERSON_BLOCKED_GOVERNMENT_OFFICIALPessoa bloqueada oficial de governo
PERSON_BLOCKED_JUDICIAL_REQUESTPessoa bloqueada por solicitação judicial
PERSON_BLOCKED_REQUESTPessoa bloqueada por solicitação
PERSON_BLOCKED_GOVERNMENT_MINISTERPessoa bloqueada ministro de governo
PERSON_BLOCKED_STF_STJ_MINISTERPessoa bloqueada ministro do STF ou STJ
PERSON_BLOCKED_ARMED_FORCES_COMMANDERPessoa bloqueada comandante das forças armadas
BASIC_DATA_NOT_FOUNDDados básicos não encontrados

Find Record By Id Errors

CódigoDescrição
USER_NOT_FOUNDUsuário logado não encontrado
RECORD_ID_NOT_FOUNDID do cadastro não encontrado na input
RECORD_NOT_FOUNDCadastro não encontrado

Support

If you are having trouble with our API, please reach us through our support number with the largest amount of details as possible.

Here are a few informations that might help us debug it:

  • The Environment
  • Request Path
  • Request Method
  • HTTP error code
  • JSON sent
  • JSON received
  • The time of the request
  • Print screen
  • Origin IP