mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-03-17 10:15:49 -05:00
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
package worker
|
|
|
|
import "errors"
|
|
|
|
// Deprecated: NonRetryableError is an internal type used by the new Go SDK.
|
|
// Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go
|
|
type NonRetryableError struct {
|
|
e error
|
|
}
|
|
|
|
// Deprecated: Error is an internal method used by the new Go SDK.
|
|
// Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of using this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go
|
|
func (e *NonRetryableError) Error() string {
|
|
return e.e.Error()
|
|
}
|
|
|
|
// Deprecated: NewNonRetryableError is an internal function used by the new Go SDK.
|
|
// Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go
|
|
func NewNonRetryableError(err error) error {
|
|
return &NonRetryableError{e: err}
|
|
}
|
|
|
|
// Deprecated: IsNonRetryableError is an internal function used by the new Go SDK.
|
|
// Use the new Go SDK at github.com/hatchet-dev/hatchet/sdks/go instead of calling this directly. Migration guide: https://docs.hatchet.run/home/migration-guide-go
|
|
func IsNonRetryableError(err error) bool {
|
|
e := &NonRetryableError{}
|
|
return errors.As(err, &e)
|
|
}
|