@@ -58,6 +58,10 @@ func Forbidden(ctx context.Context, err error) *gqlerror.Error {
|
||||
}
|
||||
}
|
||||
|
||||
func Forbiddenf(ctx context.Context, format string, a ...any) *gqlerror.Error {
|
||||
return Forbidden(ctx, fmt.Errorf(format, a...))
|
||||
}
|
||||
|
||||
func NotFound(ctx context.Context, err error) *gqlerror.Error {
|
||||
return &gqlerror.Error{
|
||||
Message: err.Error(),
|
||||
@@ -68,6 +72,10 @@ func NotFound(ctx context.Context, err error) *gqlerror.Error {
|
||||
}
|
||||
}
|
||||
|
||||
func NotFoundf(ctx context.Context, format string, a ...any) *gqlerror.Error {
|
||||
return NotFound(ctx, fmt.Errorf(format, a...))
|
||||
}
|
||||
|
||||
func Conflict(ctx context.Context, err error) *gqlerror.Error {
|
||||
return &gqlerror.Error{
|
||||
Message: err.Error(),
|
||||
|
||||
Reference in New Issue
Block a user