# Error handling

**Here are some common errors you might encounter when using our Data Portability API, along with tips on how to resolve them.**

## Overview

Your integration code should contain error handling logic to gracefully handle any errors that can occur on a request to the Data Portability API.
The endpoint returns an HTTP error status code(4xx for a client-side error or 5xx for a server-side error).

### Error Response


```json
  {
	"errorCode": <HTTP error status code>,
	"errorMessaage": <Error cause>
  }
```

## HTTP status codes

### 200 - OK

The request completed successfully and the response contains the requested [data](/datasecurity/docs/development-guide/data-schema).

### 202 - Accepted

The user’s report generation is in progress.

#### Solution

Please retry after 5min.

### 400 - Bad request

Invalid request. No live port request exists for the user in our system. These can be the probable reasons:-

- The request expired its lifetime.
- The report has already been ported by some other client.
- User cancelled the port request.


#### Solution

Please ask the user to initiate a new data porting request on Booking.com and generate a new Data Portability URL.

### 401 - Unauthorised

The request cannot be authenticated. The access token is invalid. Probable reasons:-

- The access token has expired.
- The client is not registered for the DMA [scope](/datasecurity/docs/development-guide/authentication#scope).


#### Solution

- Please request a new access token by following the steps mentioned [here](/datasecurity/docs/development-guide/authentication).
- Please [register](/datasecurity/registration) the client to consume the DMA scope.


### 429 - Too Many Request

The request cannot be accepted because you have sent too many requests in a given amount of time.

#### Solution

Please try again after some time.

### 500 - Internal Server Error

Something went wrong while processing your request. There seems to be an issue in our system.

#### Solution

Please try again after some time.