gitlab-webhook-receiver icon indicating copy to clipboard operation
gitlab-webhook-receiver copied to clipboard

Receiving HTTP 500's on every request

Open volcano1111 opened this issue 5 years ago • 1 comments

Hello. I'm trying to setup webhooks in GitLab with your receiver. But every my request ends with an HTTP 500 error and I can't understand what's wrong. GitLab says "Hook executed successfully but returned HTTP 500". Script output: "2021-01-12 14:51:01,074 INFO Hook received 127.0.0.1 - - [12/Jan/2021 14:51:01] "POST / HTTP/1.1" 500 -". My config is very simple just for a test: "--- https://git.am.int/tardis/tardis: command: uname gitlab_token: P-XxgRetf4jgv2FZVADY"

volcano1111 avatar Jan 12 '21 11:01 volcano1111

Hi, volcano1111!

I encountered the same error, but found the solution in the source code. project = json_params['project']['name'] tells us that we should specify the project name instead of the url in config file. If you need to specify an url (as in the example from the readme), you need to fix the code so that it looks like project= json_params['project']['web_url'].

Hope this was helpful.

paramobilus avatar Apr 22 '21 20:04 paramobilus