Error codes and messages

When you start the federation component, once there's an error either from the provider or Frankie internal service, you will receive an error event, in which there's an error message along with errorCode. If the error is from the provider, you will also get an issue object with more details.

federationComponent.on("error", ({ message, payload }) => {
  console.log(message, payload);

Sample error response:

Failed sending authorisation: "Could not fetch profile from singpass" 
issues: undefined

Provider errors

Error codePossible error messagesNotes
"VENDOR_SERVER_ERROR" "server error"The provider is not available or responsive.
"VENDOR_UNAUTHORISED""Invalid authorisation for ${providerName}"Unauthorised error code from the provider, possibly due to invalid header parameters.
"VENDOR_BAD_REQUEST"1. "Incorrect parameter"

2. "Could not fetch profile from ${providerName}"

3. "Could not transform profile from ${providerName}"
We couldn't fetch the token or data due to a bad request or missing mandatory attributes.

If any of the mandatory data attributes are missing from the fetched data, the Frankie service won't be able to proceed with eKYC process as it requires those attributes. In this case, you will get one of the following issue codes:
"VENDOR_ACCESS_DENIED"1. "There was an issue fetching access token from ${providerName}"

2. "User denied the access"
There's an issue with the authorisation code. Either we received an invalid or expired code, or the user didn't authorise.
"VENDOR_FORBIDDEN""Invalid attributes for ${providerName}"Forbidden error code from the provider, possibly something wrong with requested data attributes.
"VENDOR_DATA_EXPIRED""The data has expired or does not exist"

Internal service errors

Error codeError messagePotential reasons
"INVALID_CONFIG""The auth config for ${providerName} is not valid"The configuration for the federation process is invalid or not set up correctly.
"BAD_REQUEST""Unexpected data attribute"Retrieved data attributes don't match the configured ones.
"SERVER_ERROR""Unable to process the data"After fetching the data from the provider, if we're not able to read, decrypt, or process the data, you will get this error.