Open
Description
The MaskErrors
schema extension does not seem to mask errors for subscriptions. I am running on the latest version of strawberry
. Example included below:
from typing import AsyncIterator
import strawberry
from strawberry.extensions import MaskErrors
@strawberry.type
class Query:
@strawberry.field
def hello(self) -> str:
raise Exception("boom")
return "world"
@strawberry.type
class Subscription:
@strawberry.subscription
async def stream(self) -> AsyncIterator[str]:
yield "hello"
yield "world"
raise Exception("boom")
schema = strawberry.Schema(
query=Query, subscription=Subscription, extensions=[MaskErrors()]
)
The errors are masked for queries:
But not for subscriptions:
Describe the Bug
I expect the MaskErrors
extension to mask my errors for subscriptions as well as queries and mutations, but it does not appear to do so.
System Information
- Operating system: MacOS
- Strawberry version (if applicable): 0.247.0
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment