openllb / hlb

A developer-first language to build and test any software efficiently
https://openllb.github.io/hlb/
Apache License 2.0
108 stars 12 forks source link

Override the solve error if ErrorHandler returns an error #326

Closed yun-wang closed 2 years ago

yun-wang commented 2 years ago

Came across the issue when testing the shell-on-error implementation.

If the debugger returns the ErrDebugExit error, the error string gets wrapped in the main solve goroutine after the gRPC call. Error check on ErrDebugExit fails afterwards because we lose the original error from the gRPC call.

This PR overrides the solve error to the original error, so the error check on ErrDebugExit succeeds.