is there some way to set/enrich the error message ...
# help
g
is there some way to set/enrich the error message on the GUI if the webhook response is negative (!= 2xx)? Because I simply tried to set a respond message (with Ktor)
Copy code
if ("DATASET.json" !in diffList.results.map { it.path.substringAfterLast('/') })
    call.respond(io.ktor.http.HttpStatusCode.NotAcceptable, "DATASET.json not found")
else
    call.respond(io.ktor.http.HttpStatusCode.OK, "DATASET.json found")
but the error message on the GUI, after the commit (the webhook is on pre-commit) is still a generic: > pre-commit hook aborted, run id '5d7g5aapdakrls40rrv0': 1 error occurred: * hook run id '0000_0000' failed on action 'Dataset' hook 'dataset_validator': webhook request failed (status code: 406)
a
Hey @Giuseppe Barbieri, Actions cannot emit error messages to the user performing the action. But you should be able to click on run ID and see all logs generated by the action. This is of course just an API call, and subcommands of
lakectl actions runs
will let you read it from the CLI. HTH!
g
uh, very nice, so we can see the message nonetheless sure it helps
sunglasses lakefs 2