We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Proper error handling is missing
To Reproduce running the example (functions):
$ go run main.go daemon -f ../../examples/functions/config.hcl
making the request (missing "name" parameter):
[POST] http//localhost:8080/numeric
{ "age": 35 }
getting status 500 Internal Server Error and empty response body
500 Internal Server Error
Application log:
1622023136544832264 info listener.http serving HTTP listener {"addr": ":8080"} 1622023161881029516 error flow.numeric an error occurred, executing rollback {"error": "value is not set"} github.com/jexia/semaphore/v2/pkg/broker/logger.Error /home/alma/Projects/semaphore/pkg/broker/logger/logger.go:85 github.com/jexia/semaphore/v2/pkg/flow.(*Manager).Do /home/alma/Projects/semaphore/pkg/flow/flow.go:154 github.com/jexia/semaphore/v2/pkg/transport/http.(*Handle).HTTPFunc /home/alma/Projects/semaphore/pkg/transport/http/listener.go:252 github.com/julienschmidt/httprouter.(*Router).ServeHTTP /home/alma/Projects/semaphore/vendor/github.com/julienschmidt/httprouter/router.go:387 github.com/jexia/semaphore/v2/pkg/transport/http.(*Listener).Serve.func1 /home/alma/Projects/semaphore/pkg/transport/http/listener.go:68 net/http.HandlerFunc.ServeHTTP /usr/lib/go/src/net/http/server.go:2069 net/http.serverHandler.ServeHTTP /usr/lib/go/src/net/http/server.go:2887 net/http.(*conn).serve /usr/lib/go/src/net/http/server.go:1952
Expected status 400 Bad Request and response body containing:
400 Bad Request
{ "error": "value is not set" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Proper error handling is missing
To Reproduce
running the example (functions):
making the request (missing "name" parameter):
getting status
500 Internal Server Error
and empty response bodyApplication log:
Expected
status
400 Bad Request
and response body containing:The text was updated successfully, but these errors were encountered: