---
title: Handling error responses from Apple Push Notification service
framework: usernotifications
role: article
role_heading: Article
path: usernotifications/handling-error-responses-from-apns
---

# Handling error responses from Apple Push Notification service

Respond to the status codes returned by APNs servers.

## Overview

Overview Apple Push Notification service (APNs) provides a response to each request your server transmits. Each response contains a header with fields indicating the status of the response. If the request succeeded, the body of the response is empty. If an error occurred, the body contains a JSON dictionary with additional information about the error. Interpret header responses The table below describes the meaning of the keys in the header response for a failed request.  |   |   |  The table below lists the possible values in the :status header of the error response.  |   |   |   |   |   |   |   |   |  Understand error codes The key below is found in the JSON dictionary for unsuccessful requests. The JSON data might also be included in a GOAWAY frame when a connection terminates.  |   |  During testing, if you find that your test devices aren’t receiving push notifications sent by your provider server, refer to Troubleshooting push notifications to troubleshoot. The table below lists the possible error codes included in the reason key of a response’s JSON payload.  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |  The following code snippet shows a sample response when an error occurs. HEADERS   - END_STREAM   + END_HEADERS   :status = 400   content-type = application/json   apns-request-id: <a_UUID> DATA   + END_STREAM   { "reason" : "MissingChannelId" }

## See Also

### Broadcast push notifications

- [Setting up broadcast push notifications](usernotifications/setting-up-broadcast-push-notifications.md)
- [Sending channel management requests to APNs](usernotifications/sending-channel-management-requests-to-apns.md)
- [Sending broadcast push notification requests to APNs](usernotifications/sending-broadcast-push-notification-requests-to-apns.md)
