-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Ignoe derp.yaml, don't panic in Serve() #248
Conversation
@kradalby Do you know why the integration-test for the second pr fails? It adds only more logging. |
They are a bit flaky, I think they are a bit more resource hungry than actions wants to so they might get in an awkward state. Reruns usually helps... |
Makes sense. Thanks for the info! |
app.go
Outdated
@@ -418,12 +418,12 @@ func (h *Headscale) Serve() error { | |||
|
|||
err = h.ensureUnixSocketIsAbsent() | |||
if err != nil { | |||
panic(err) | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is sensible,
But could you wrap these errors to give the user more context, when we are first at improving :)
So:
return err | |
return fmt.Errorf("description: %w", err) |
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
If there is no specifc reason to panic I think it's better to just return the error.