-
Notifications
You must be signed in to change notification settings - Fork 976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API: return 500 on script failure #3223
Labels
Comments
This seems a valid issue. |
JavierJF
added a commit
that referenced
this issue
Mar 10, 2021
- Fixed return of proper http error codes on script failure or internal failure to perform script execution. Introduced error codes: - 424: Script execution failed, either due to script failing to be executed, exiting with non-zero error code or output not being a valid JSON. - 500: Internal error while trying to execute script. - 200: Script was able to be executed properly, and result was properly parsed. - Fixed dangling process left by 'return' in child process resulted from 'fork()' call. - Fixed limitation of maximum return size of 48kb from executed script. - Improved usage of 'read()' by using NONBLOCKING pipes. - Fixed leaving child process alive after timeout expiration, now process is properly terminated. - Improved general logging and returned JSONs in case of errors.
JavierJF
added a commit
that referenced
this issue
Mar 10, 2021
+ Added generic test for checking script execution through 'RESTAPI'. + Added multiple new scripts fails to be executed through the 'RESTAPI'.
renecannao
added a commit
that referenced
this issue
Mar 11, 2021
Closes #3223: Return proper errors codes on RESTAPI for script failures
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I would like to expose a script to serve as a Kubernetes readiness probe, but noticed that all API calls return
200
whether the script fails or not. Can we handle it in a more appropriate manner?Meanwhile, I'm just using
exec
probe.Thanks!
The text was updated successfully, but these errors were encountered: