Test error statuses

You can use test mode to verify that your application properly handles various error statuses that Smartcar may return. There are two types of errors that can occur after integrating Smartcar into an application:

  1. Connect errors
  2. Request errors

1. Connect errors

Connect errors are errors that occur during Smartcar Connect. The following section explains the different kinds of Connect errors and how to test them. For more information, please see our API reference.

access_denied

This error occurs when a user denies your application access to the requested scope of permissions. To test this error, launch Smartcar Connect in test mode and select “Deny access” on the permissions screen.

Access Denied

We recommend handling this error by re-prompting the user to authorize their vehicle and adding a message like in the example below.

Access Denied Message

vehicle_incompatible

This error occurs when a user tries to authorize an incompatible vehicle in Smartcar Connect. In order to be compatible, a vehicle must:

  1. Have the hardware required for internet connectivity
  2. Belong to the makes and models Smartcar is compatible with
  3. Be capable of the required permissions that your application is requesting access to

If the user’s vehicle is incompatible, Smartcar will let the user know and offer them to share their vehicle’s VIN, make, model, and year with your application.

We recommend that your application provides a flow for incompatible vehicles like in the example below.

Vehicle Incompatible

Note: This error will never occur if your application uses the Compatibility API. The Compatibility API verifies the compatibility of a vehicle before the user enters Smartcar Connect.
To test this error, launch Smartcar Connect in test mode and log in with the email smartcar@vehicle-incompatible.com and any password. If you use Single Select, please see the table below for a simulated VIN.
EmailVIN
smartcar@vehicle-incompatible.com0SCAUDI012FE3B132

invalid_subscription

This error occurs when a user’s vehicle is compatible but their connected services subscription is inactive because either it has expired or it has never been activated. Smartcar will direct the user to the connected services website to (re-)activate their subscription. However, a user may choose to return back to your application instead, like in the example below.

No Subscription

To test this error, launch Smartcar Connect in test mode and log in with the email smartcar@invalid-subscription.com and any password. If you use Single Select, please see the table below for a simulated VIN.
EmailVIN
smartcar@invalid-subscription.com0SCAUDI0155C49A95

 

In the event of an AUTHENTICATION_FAILED, the user will need to be prompted to re-connect their vehicle. Smartcar Connect Re-authentication makes the process of re-authenticating a user much more seamless. In addition, the AUTHENTICATION_FAILED error provides a partially constructed URL for the re-authentication flow inside the resolution object.

no_vehicles

This error occurs when a vehicle owner has a connected services account, but there are no vehicles associated with the account. The error is triggered when a user logs into their connected services account and is shown to have no vehicles listed like in the example below for BMW.

No Vehicle Error

The user has the option to add vehicles or return to your application.

configuration_error

This error occurs when the user has encountered an Error page in Connect and has chosen to return to your application. On redirect, Connect will return the status code and message of the error that they encountered. This will be triggered if:

    • A user tried to directly navigate to a page that is past their current step in Connect (ie. going directly from the Preamble screen to the Permission Grants screen by directly going to connect.smartcar.com/grant).
    • A user is trying to use Single Select in live mode with a test mode VIN or with a simulated VIN in a non-simulated mode.
    • A user is trying to use Single Select with an invalid mock VIN.
    • A validation error occurs when trying to check compatibility by VIN.

These cases will trigger the following error and give the user the ability to “Exit” Connect. Error Page

server_error

If there is a server error, the user will return to your application.

2. Request errors

Request errors are errors that occur when an API request to a vehicle is unsuccessful. For a full list of all request errors, see our API reference. For detailed instructions on how to simulate and test request errors using Smartcar’s test mode, please refer to the test error guides.

In the event of an AUTHENTICATION_FAILED error, you’ll receive a reauth URL in the error response body that you can use to prompt the user to reauthenticate their connected service account. You will need to provide a redirect URI as a parameter.