Skip to main content

face-error-codes

Error Codes

  • An error code of 1 corresponds to a PermissionNotGrantedError. This code will be thrown because the camera permissions were denied or were otherwise unavailable. Unless the user manually changes something about their configuration, future attempts to open the camera in this session will throw the same error code. It is recommended to direct the user to manual capture instead.

  • An error code of 2 corresponds to an UnexpectedError. This error will generally be accompanied by a plain text message describing what went wrong. The most common example of where this might occur is the user uploading a corrupt file, blank file, or cancelling out of the file upload process. Generally this error is not fatal and the user can be allowed to continue the process as usual. However if this code is getting issued continually it might be better to redirect the user to an alternate solution as either the user is continually doing something wrong or there is some strange uncaught error with the user's configuration (possibly third party browser add-ons breaking the code).

  • An error code of 3 corresponds to a TimeoutError. This error is issued when the initializationTimeoutDuration has elapsed without the InitializeEventName being dispatched. This may indicate an internal failure or unexpected delays in model loading. Clients should handle this error by retrying initialization or providing an alternative user experience.