♻️ Use internal error for ResponseType domain error
This commit is contained in:
parent
f62ce1db0a
commit
878aee22a2
|
@ -1,7 +1,6 @@
|
||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -29,7 +28,11 @@ var (
|
||||||
ResponseTypeCode ResponseType = ResponseType{uid: "code"}
|
ResponseTypeCode ResponseType = ResponseType{uid: "code"}
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrResponseTypeUnknown error = errors.New("unknown grant type")
|
var ErrResponseTypeUnknown error = NewError(
|
||||||
|
ErrorCodeUnsupportedResponseType,
|
||||||
|
"unknown grant type",
|
||||||
|
"https://indieauth.net/source/#authorization-request",
|
||||||
|
)
|
||||||
|
|
||||||
// ParseResponseType parse string as response type struct enum.
|
// ParseResponseType parse string as response type struct enum.
|
||||||
func ParseResponseType(uid string) (ResponseType, error) {
|
func ParseResponseType(uid string) (ResponseType, error) {
|
||||||
|
|
Loading…
Reference in New Issue