You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-11-06 09:29:19 +02:00
normalized internal errors formatting
This commit is contained in:
@@ -74,5 +74,5 @@ func findSendmailPath() (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return "", errors.New("Failed to locate a sendmail executable path.")
|
||||
return "", errors.New("failed to locate a sendmail executable path")
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ func (r *SimpleFieldResolver) UpdateQuery(query *dbx.SelectQuery) error {
|
||||
// Returns error if `field` is not in `r.allowedFields`.
|
||||
func (r *SimpleFieldResolver) Resolve(field string) (*ResolverResult, error) {
|
||||
if !list.ExistInSliceWithRegex(field, r.allowedFields) {
|
||||
return nil, fmt.Errorf("Failed to resolve field %q.", field)
|
||||
return nil, fmt.Errorf("failed to resolve field %q", field)
|
||||
}
|
||||
|
||||
parts := strings.Split(field, ".")
|
||||
|
||||
@@ -39,7 +39,7 @@ func ParseJWT(token string, verificationKey string) (jwt.MapClaims, error) {
|
||||
return claims, nil
|
||||
}
|
||||
|
||||
return nil, errors.New("Unable to parse token.")
|
||||
return nil, errors.New("unable to parse token")
|
||||
}
|
||||
|
||||
// NewJWT generates and returns new HS256 signed JWT.
|
||||
|
||||
@@ -41,7 +41,7 @@ func (m *JsonArray[T]) Scan(value any) error {
|
||||
case string:
|
||||
data = []byte(v)
|
||||
default:
|
||||
return fmt.Errorf("Failed to unmarshal JsonArray value: %q.", value)
|
||||
return fmt.Errorf("failed to unmarshal JsonArray value: %q", value)
|
||||
}
|
||||
|
||||
if len(data) == 0 {
|
||||
|
||||
@@ -56,7 +56,7 @@ func (m *JsonMap) Scan(value any) error {
|
||||
case string:
|
||||
data = []byte(v)
|
||||
default:
|
||||
return fmt.Errorf("Failed to unmarshal JsonMap value: %q.", value)
|
||||
return fmt.Errorf("failed to unmarshal JsonMap value: %q", value)
|
||||
}
|
||||
|
||||
if len(data) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user