In golang, `panic()` and `return err` are two different ways of unwinding the stack. 80% of my error handling in go is `return nil, err`. But there's no reason syntactic sugar couldn't be applied for something like `when err { return nil, err} { err := doSomething() }`
I don’t like go much - languages that can have nil pointer errors can take a hike, but what I like even less than a nil pointer error while handling a request, is for my whole process to die unrecoverably because someone forgot to check a nil in an infrequently called API. Or when comparing something that’s not allowed to be compared. Like the language would be better if these mistakes were impossible to make, but as long as we have a language with a plethora of garden variety syntax can panic like `a.b` or `a == b` we should be able to mitigate that risk at runtime.