bfe15d87d8
The ResponseError.data field was typed `dynamic` (as in the LSP spec) but this allows us to accidentally put non-serializable classes in it which will result in server errors when we try to send them back. This change forces them to Strings and it's up to the code constructing the error to convert any additional data to a string first. In order to catch this in tests, the mocks now force serialisation of all types flowing from the server to the client (this already happened for client to server). Change-Id: I5d7f322e1a4296b1479468e36d81daebdbb4ab52 Reviewed-on: https://dart-review.googlesource.com/c/89511 Commit-Queue: Danny Tuppeny <dantup@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>