Hi, I'm working in a notification app and I'm trying to add a notification when pipelines starts and finish. I tried to execute a curl in a after-script step and it throws me the following error error:
"curl: (56) Recv failure: Connection reset by peer"

When I execute the same curl inside the step, in other step after-script or even if that step fails the curl works just fine. The problem whit this curl is only when the script runs correctly.
This is my after script code:
after-script:
- echo $BITBUCKET_EXIT_CODE
- if [ $BITBUCKET_EXIT_CODE == 0 ]; then export TAG="success"; else export TAG="failed"; fi
- curl -d "{\"app\":\"notification_app\",\"title\":\"$BITBUCKET_REPO_FULL_NAME\",\"author\":\"bitbucket\",\"content\":\"deployment finished\",\"tag\":\"$TAG\",\"link\":\"https://bitbucket.org/$BITBUCKET_REPO_FULL_NAME/addon/pipelines/home#!/results/$BITBUCKET_BUILD_NUMBER\",\"type\":\"deploy\",\"filters\":[\"deploy\",\"EAP\"]}" -H "Content-Type:application/json" -X POST http://$URL/api/v1/notifications
- echo 'Pipeline Finished'