absinthe-graphql / absinthe-socket

Core JavaScript support for Absinthe WS-based operations
MIT License
148 stars 75 forks source link

Stringify error message in subscription onError #62

Open matrinox opened 2 years ago

matrinox commented 2 years ago

By default we should show an error that the engineer can immediately understand

mgtitimoli commented 2 years ago

Graphql spec says error message should be string and there is an extensions field to provide additional context about the error (https://github.com/absinthe-graphql/absinthe-socket/issues/29#issuecomment-1146908311), I would prefer to take this route and add support to the extensions field.

Would it be possible for you to return the error context in the extensions field instead?

matrinox commented 2 years ago

@mgtitimoli sure, let me investigate