Files
hatchet/pkg/worker/errors.go
Mohammed Nafees 22fd98e828 More deprecation messages for older Go SDKs (#3006)
* add more deprecation messages to older Go SDKs

* more comments
2026-02-12 15:40:47 +01:00

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)
}