[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["This page shows you how to resolve issues with [payload unwrapping](/pubsub/docs/payload-unwrapping).\n\nHTTP status code errors\n\nWhen using payload unwrapping, common HTTP status code errors can occur.\nYou can monitor the errors with the [`push_request_count`](/monitoring/api/metrics_gcp_p_z#pubsub/subscription/push_request_count) metric.\n\n400 bad request\n\nThe following error occurs when Pub/Sub can't process the request\ndue to a misconfiguration or missing data. \n\n 400 Bad Request\n\nThis error occurs due to several reasons. The following are some of the most\ncommon causes of the error:\n\n- The payload (message data) doesn't match the expected request format specified by the HTTP endpoint.\n- The necessary headers to process the request are missing.\n- An incorrect HTTP endpoint is configured for the subscription.\n\nTo resolve this issue, try the following solutions:\n\n- Check the format of your payload (message data). Make sure it matches the expected request format specified by the HTTP endpoint.\n- Check that the request contains the required headers. If the headers are missing, you might need to add them in the message attributes. An example may include `Content-Type`, but others may be necessary as well.\n- Confirm that the HTTP endpoint configured for your subscription is valid.\n- Enable [Dead Letter Queue (DLQ)](/pubsub/docs/handling-failures#dead_letter_topic) on your push subscription. This redirects individual messages that can't be delivered. It's helpful to enable DLQ if you see a small number of 400 errors that you want to inspect.\n\n401 unauthorized / 403 forbidden\n\nThe following error occurs when Pub/Sub can't process the request\ndue to incorrect or invalid credentials. \n\n 401 unauthorized / 403 forbidden\n\nThis error occurs because the push subscription isn't authenticated.\n\nTo resolve this issue, try the following solutions:\n\n- Enable [Push authentication](/pubsub/docs/push#authentication). Using Push\n authentication is important if you are integrating with\n Cloud Run or App Engine.\n\n If push authentication doesn't work with your solution, then you might need\n to add your own authorization key or API key in the publish message attributes.\n\n415 Unsupported Media Type\n\nThe following error occurs when Pub/Sub can't process the request\nbecause the payload format is in an unsupported format. \n\n 415 Unsupported Media Type\n\nThis error occurs due to several reasons. The following are some of the most\ncommon causes of the error:\n\n- The endpoint is missing the required media-type header.\n\nTo resolve this issue, try the following solution:\n\n- Your endpoint likely requires a `Content-Type` header. By default, payload unwrapping, doesn't set a media type header. You can set a `Content-Type` header by attaching it as a [publish message attribute](/pubsub/docs/payload-unwrapping).\n\n431 request header fields too large / 413 content too large\n\nThe following error occurs when Pub/Sub can't process the request\nbecause the content sent in the request is too large. \n\n 431 request header fields too Large / 413 content too large\n\nThis error occurs if the [attributes in a Pub/Sub\nmessage](/pubsub/quotas#resource_limits) exceed the [header limit size of a\nserver](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Size_limits).\n\nTo resolve these issues, try the following solutions:\n\n- Turn off [**Write metadata**](/pubsub/docs/payload-unwrapping#how_payload_unwrapping_works).\n- Enable [Dead Letter Queue (DLQ)](/pubsub/docs/handling-failures#dead_letter_topic) on your push subscription. This redirects individual messages that can't be delivered. After, your subscription continues to operate, but the messages with errors are redirected to a separate topic for further analysis.\n\nCheck if payload unwrapping is enabled\n\n1. In the Google Cloud console, go to the **Subscriptions** page.\n\n [Open Pub/Sub subscriptions](https://console.cloud.google.com/cloudpubsub/subscription)\n2. Click the name of your service.\n\n The service detail page opens.\n3. In the configuration table, find the following values: **Message data\n unwrapping** and **Write message metadata**.\n\n The status of payload wrapping (enabled or disabled) is displayed in the\n corresponding table row.\n\nWhat's next\n\n- If you still have issues with payload unwrapping, see [Getting support](/pubsub/docs/getting-support)."]]