mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-31 13:49:48 -06:00
* feat: add boolean flag to proto * feat: initial wiring up priorities and non-retryables * fix: query * fix: cruft comment * fix: rm priority changes * feat: python side * feat: tests for non-retrying workflows * feat: expand tests * chore: generate ts * feat: add name prop to wf * feat(go-sdk): non retryable error * feat: start implementing ts * cleanup: simplify to raising a specific error * fix: simplify ts * feat: ts examples * feat: ver * feat: docs * fix: tests + linters --------- Co-authored-by: Alexander Belanger <alexander@hatchet.run>
21 lines
327 B
Go
21 lines
327 B
Go
package worker
|
|
|
|
import "errors"
|
|
|
|
type NonRetryableError struct {
|
|
e error
|
|
}
|
|
|
|
func (e *NonRetryableError) Error() string {
|
|
return e.e.Error()
|
|
}
|
|
|
|
func NewNonRetryableError(err error) error {
|
|
return &NonRetryableError{e: err}
|
|
}
|
|
|
|
func IsNonRetryableError(err error) bool {
|
|
e := &NonRetryableError{}
|
|
return errors.As(err, &e)
|
|
}
|