Build trigger to custom webhook never finishes in dashboard

Describe the issue:

  • Please include any relevant error messages, screenshots, and troubleshooting you’ve already tried.

Hello!

I have a Build Trigger created from the Project Settings Development Tools. It is setup to hit a custom webapi (aws lambda). The lambda includes a post request to update DatoCMS with the status of the publishing operation to the uri the ui provides. This post requests returns a status of 204 and the lambda runs and finishes correctly just as it should.

Problem is, the trigger never finishes in the DatoCMS project dashboard. Build status never changes from “Build in progress…” to anything else. With the only option being to click “Abort and mark as failed”.

(Optional) Can you provide a link to the item, model, or project in question?

The projectId is 106829

(Optional) Do you have any sample code you can provide?

  await axios
    .post(
      'uri',
      { status: 'success' },
      {
        headers: { 'Content-Type': 'application/json' },
      }
    )
    .then(response => {
      console.log('Alerted datoCMS of success', response)
    })
    .catch(error => {
      console.error('failed to alert datoCMS', error)
    })