mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-07-19 11:19:58 +02:00
21 lines
544 B
Go
21 lines
544 B
Go
package common
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
// ErrUnsupportedActorMethod is returned by custom actors when the invoked method isn't supported
|
|
type ErrUnsupportedActorMethod struct {
|
|
Method string
|
|
}
|
|
|
|
func (e ErrUnsupportedActorMethod) Error() string {
|
|
return "method '" + e.Method + "' unsupported for actor invocation"
|
|
}
|
|
|
|
func (e ErrUnsupportedActorMethod) Is(target error) bool {
|
|
// Ignore the field method when checking if an error is of the type ErrUnsupportedActorMethod
|
|
_, ok := errors.AsType[ErrUnsupportedActorMethod](target)
|
|
return ok
|
|
}
|