Hi there!
I'm trying to diagnose an HTTP 400 I'm seeing from GitLab's API when using this action. Unfortunately, the error message surfaced by this action is pretty opaque:
Error: GitLab API returned status code 400.
That comes from here:
|
let errorMessage = `GitLab API returned status code ${response.status}.`; |
I think this could be improved by dumping the (raw) JSON from the error response. Ideally we'd extract the exact message, but GitLab doesn't seem to do a great job of guaranteeing the shape:
https://docs.gitlab.com/api/rest/troubleshooting/#status-code-400
If that sounds reasonable, I'm happy to send a PR that adds a dump of the JSON when verbose: true is enabled.
Hi there!
I'm trying to diagnose an HTTP 400 I'm seeing from GitLab's API when using this action. Unfortunately, the error message surfaced by this action is pretty opaque:
That comes from here:
gitlab-pipeline-trigger-action/index.js
Line 56 in b5e35a1
I think this could be improved by dumping the (raw) JSON from the error response. Ideally we'd extract the exact message, but GitLab doesn't seem to do a great job of guaranteeing the shape:
https://docs.gitlab.com/api/rest/troubleshooting/#status-code-400
If that sounds reasonable, I'm happy to send a PR that adds a dump of the JSON when
verbose: trueis enabled.