# Migration v36

Contains break changes in the errors thrown by SDK (GraphQL service)

## Changes

The GraphQL Service will now be throwing a new format of errors. It will throw UpstreamServiceErrors (502) (imported from @dotcom-reliability-kit/errors) instead of ServerErrors (500) when the GraphQL returns an error.

## What to do

If you are handling or responding to errors thrown by the Graphql Service of the SDK, you may need to change how you do this, particularly if you are checking for a 500 status.
The Error will now include a `statusCode` (along with the previous`status`), `code` (e.g. UNKNOWN_MEMB_GRAPHQL_ERROR\_\_USER_DETAILS), `relatesToSystems` (e.g. ['memb-graphql-api']). The previous data keys `url`, `status`, `requestBody`, `responseBody` & `method` will be found under `requestData`.
UpstreamServiceError does not extend the BaseError class, it will not have the `toString()` method.

Any existing code relying on the previous structure of GraphQL errors may break.
