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:
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.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too