Skip to content

Commit ae48e0e

Browse files
alepane21dkorittki
andauthored
fix: use core graphql error
Co-authored-by: Dominik <23359034+dkorittki@users.noreply.github.com>
1 parent 3943d81 commit ae48e0e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/router/event-driven-federated-subscriptions-edfs/custom-modules.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,7 @@ func (m *MyModule) SubscriptionOnStart(ctx SubscriptionOnStartHandlerContext) er
221221

222222
// Check if the client is authenticated
223223
if ctx.Authentication() == nil {
224-
return &core.HttpError{
225-
Code: http.StatusUnauthorized,
226-
Message: "client is not authenticated",
227-
CloseSubscription: true,
228-
}
224+
return core.NewHttpGraphqlError("client is not authenticated", http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
229225
}
230226

231227
// Check if the client has the required permissions

0 commit comments

Comments
 (0)