Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Func now only returns an error when the error is not nil. ## Why is this needed logs were showing an error when there wasnt one. ```json {"level":"error","ts":1695434959.912211,"caller":"script/ipxe.go:152","msg":"unable to write boot script","script":"auto.ipxe","error":"writing response: %!w(<nil>)","stacktrace":"github.com/tinkerbell/smee/ipxe/script.(*Handler).serveBootScript\n\t/home/tink/repos/tinkerbell/boots/ipxe/script/ipxe.go:152\ngithub.com/tinkerbell/smee/ipxe/script.(*Handler).HandlerFunc.func1\n\t/home/tink/repos/tinkerbell/boots/ipxe/script/ipxe.go:108\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.WithRouteTag.func1\n\t/root/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:262\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2122\nnet/http.(*ServeMux).ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2500\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*Handler).ServeHTTP\n\t/root/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:212\ngithub.com/tinkerbell/smee/ipxe/http.(*loggingMiddleware).ServeHTTP\n\t/home/tink/repos/tinkerbell/boots/ipxe/http/middleware.go:35\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2936\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1995"} ``` Fixes: # ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information