Troubleshoot Webhooks

このページの内容

When you perform an action to trigger a webhook and it doesn't work, you can use the Request log and Request detail pages to figure out what went wrong.

Note that you may need to know the Bitbucket Cloud IP addresses to whitelist.

Request Logs

If you aren't sure if a webhook triggered properly, you can look at the details of the request. From the list of webhooks, click the View requests link to open a log page with the last 100 requests for that webhook and what each request returned.

  1. View requests: Click to see the requests for this webhook.

A page opens with a list of request logs for the webhook. Click the Load new requests button to refresh the page with new requests.

  1. Events: Lists the events that triggered the webhook.
  2. Request time: Indicates when the even occurred.
  3. View details: Click to see the details of event requests.
  4. Status: Displays the outcome of the request and the response time in milliseconds.

When Bitbucket sends a request, the log indicates outcome of the request with one of these:

  • An HTTP status code
  • TIMEOUT, if the request timed out before connecting
  • NETWORK ERROR, if the request couldn't connect

For each request that we send following an event, if the request fails or results in a timeout 30 times in a row, we deactivate the webhook. (The 30 times only takes initial attempts into account, not additional attempts for an event.) When a webhook is deactivated, you can click to Edit the webhook and select Active to reactivate the webhook. We'll only deactivate webhooks that were added manually, not any read-only or Connect hooks.

If the status code in the payload response is in the 500-599 range, Bitbucket automatically resends the request up to two more times. If Bitbucket doesn’t receive the response to a request after 10 seconds, we won’t attempt to send another request. If an event had multiple attempts, the request log includes the details for each attempt.

If you want to know the number of attempts made for an event request, click View details and look for the Request attempts number, which includes the number of automatic attempts and any manual attempts you make from the Request details page. This number is also available in the X-Attempt-Number HTTP header of each request.

Request Details

When you click the View details link next to a logged event, you see details of the logged request event, the event payload and header that Bitbucket sends to your server, and the response and header your server sends back to Bitbucket.

From this page, you can initiate another attempt by clicking the Resend request button. You may want to resend a request if the webhook URL is working after being down previously. You can also use the button to test a change without going through the steps to trigger the webhook. If you update the webhook URL between attempts, Bitbucket sends the request to the updated URL, not the URL for the previous attempt.

  1. Event details: The event that triggered the webhook, the time it occurred, and the number of attempts so far.
  2. Resend button: Click to resend the request to the webhook URL.
  3. Attempt tabs: Click to see details for each time Bitbucket tried to send and receive payloads for a triggered event.

For explanations of what you may see under the Request Headers and Request Body tabs, see the event payloads. If an error prevents your server from sending a response back to Bitbucket, the Response Headers and Response Body tabs do not appear.

最終更新日 2017 年 11 月 27 日

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

お探しの情報が見つかりませんか?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.