[GH-ISSUE #385] Request failed with status code undefined #4046

Closed
opened 2026-05-16 06:12:18 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @arnaudoff on GitHub (Jan 30, 2022).
Original GitHub issue: https://github.com/joelwmale/webhook-action/issues/385

Hi, I'm getting the following error:

Run joelwmale/webhook-action@fd99bb3b82
Sending webhook request to ***
Error: Received status code: undefined
(node:2044) UnhandledPromiseRejectionWarning: Error: Request failed with status code: undefined
at error (/home/runner/work/_actions/joelwmale/webhook-action/fd99bb3b8272237103e349e9bb4d9b0ead9a217c/dist/main.js:92:11)
at /home/runner/work/_actions/joelwmale/webhook-action/fd99bb3b8272237103e349e9bb4d9b0ead9a217c/dist/main.js:83:17
at processTicksAndRejections (internal/process/task_queues.js:93:

This is my config:

  redeploy:
    name: Redeploy webhook call
    runs-on: ubuntu-18.04
    needs: [docker]
    steps:
      - name: Deploy docker container webhook
        uses: joelwmale/webhook-action@fd99bb3b8272237103e349e9bb4d9b0ead9a217c
        with:
          url: ${{ secrets.DEPLOY_WEBHOOK_URL  }}
          headers: "{ 'X-Hook-Auth-Password': '${{ secrets.DEPLOY_WEBHOOK_SECRET }}'}"

The url is in the form http://<ip>:<port>/hooks/<name of hook>. I tried without http:// prefix, still doesnt work. What's wrong and is there an easy way to debug it? I don't understand anything from this message. Did the request fail, or it passed but HTTP error code was returned? Is there something wrong in the setup?

Thanks in advance.

Originally created by @arnaudoff on GitHub (Jan 30, 2022). Original GitHub issue: https://github.com/joelwmale/webhook-action/issues/385 Hi, I'm getting the following error: Run joelwmale/webhook-action@fd99bb3b8272237103e349e9bb4d9b0ead9a217c Sending webhook request to *** Error: Received status code: undefined (node:2044) UnhandledPromiseRejectionWarning: Error: Request failed with status code: undefined at error (/home/runner/work/_actions/joelwmale/webhook-action/fd99bb3b8272237103e349e9bb4d9b0ead9a217c/dist/main.js:92:11) at /home/runner/work/_actions/joelwmale/webhook-action/fd99bb3b8272237103e349e9bb4d9b0ead9a217c/dist/main.js:83:17 at processTicksAndRejections (internal/process/task_queues.js:93: This is my config: ``` redeploy: name: Redeploy webhook call runs-on: ubuntu-18.04 needs: [docker] steps: - name: Deploy docker container webhook uses: joelwmale/webhook-action@fd99bb3b8272237103e349e9bb4d9b0ead9a217c with: url: ${{ secrets.DEPLOY_WEBHOOK_URL }} headers: "{ 'X-Hook-Auth-Password': '${{ secrets.DEPLOY_WEBHOOK_SECRET }}'}" ``` The url is in the form `http://<ip>:<port>/hooks/<name of hook>`. I tried without `http://` prefix, still doesnt work. What's wrong and is there an easy way to debug it? I don't understand anything from this message. Did the request fail, or it passed but HTTP error code was returned? Is there something wrong in the setup? Thanks in advance.
Author
Owner

@natlibfi-jonollil commented on GitHub (Oct 31, 2022):

I had same.
Got is fixed by returning res.status(200).json({status:200}); in express.js

<!-- gh-comment-id:1297039779 --> @natlibfi-jonollil commented on GitHub (Oct 31, 2022): I had same. Got is fixed by returning `res.status(200).json({status:200});` in express.js
Author
Owner

@joelwmale commented on GitHub (Nov 10, 2022):

This is now fixed in v2.3.2.

<!-- gh-comment-id:1310234974 --> @joelwmale commented on GitHub (Nov 10, 2022): This is now fixed in v2.3.2.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/webhook-action#4046