Subscription error response does not comply with the GraphQL specification
According to the GraphQL specification if an error occurs the response should contain a non-empty errors array.
In case of queries and mutations, this works correctly. E. g. the following response is returned:
{
"errors": [
{
"message": "Internal Server Error(s) while executing query"
}
],
"data": null
}
However, in case of subscriptions, a single error object is returned:
{
"error": {
"message": "Internal Server Error(s) while executing query"
}
}
This seems to be a violation of specs, and could cause issues for clients that expect a specification-compliant response.
Tested versions: 6.0.1, current (as of commit 0f948f8) master
Just checked this issue again with 7.0.1 (perhaps the same with 6.0.1) from the network log it appears that it does send errors array, but Playground displays it incorrectly?

@BlasiusSecundus Just tested this with GraphiQL and there I see the subscription is really sending the correct response, like you've also confirmed already with the dev console. Not sure if this still happens with Playground, but maybe raise an issue with that project instead?
I'll check again if it can be reproduced with the new, updated Playground.
@BlasiusSecundus Is this still a thing or can we close the issue?
Most likely yes. This test is actually verifying that the correct error message is sent by the server: https://github.com/graphql-java-kickstart/graphql-spring-boot/blob/master/graphql-spring-boot-test/src/test/java/com/graphql/spring/boot/test/GraphQLTestSubscriptionErrorTest.java
Received message from web socket: {"type":"error","id":"2","payload":{"errors":[{"message":"Internal Server Error(s) while executing query","locations":[]}]}}
I have to check Playground.