Error handling
Introduction
This topic guide describes how errors should be handled that are generated by the OneWelcome Flutter plugin. We will start by enumerating the plugin specific errors.
Error codes
Every error has a code which uniquely identifies the error. The errors specific to OneWelcome Flutter plugin are as follows:
Android
8001 - userProfileIsNull
8002 - authenticatedUserProfileIsNull
8003 - authenticatorIsNull
8004 - registeredAuthenticatorsIsNull
8005 - identityProvidersIsNull
8006 - qrCodeNotHaveData
8007 - methodToCallNotFound
8008 - urlCantBeNull
8009 - urlIsNotWebPath
iOS
8002 - userProfileIsNull
8003 - registeredAuthenticatorsIsNull
8004 - notRegisteredAuthenticatorsIsNull
8005 - identityProvidersIsNull
8006 - providedUrlIncorrect
8007 - loginCanceled
8008 - enrollmentFailed
8009 - authenticationCancelled
8010 - changingCancelled
8011 - registrationCancelled
8012 - cantHandleOTP
8013 - incrorrectResourcesAccess
8014 - authenticatorNotAvailable
8015 - authenticatorNotRegistered
8016 - authenticatorDeregistrationCancelled
8017 - failedParseData
8018 - responseIsNull
400 - somethingWentWrong
Every error returns an object that contains a code
and description
property. These can provide helpful information on how to recover from or handle a given error.
Plugin error codes
As the OneWelcome Flutter plugin is a wrapper for the OneWelcome Android and iOS SDKs, many errors that are returned come directly from the SDKs themselves. This is true for error codes in the ranges 9000 and higher.
These error codes are mostly consistent. However, there may be some small differences between the two platforms. See the error handling documentation for the Android SDK and the iOS SDK for details. Both sets of documentation also include a helpful error map at the bottom of the page.