From 6d50d836f538253e2d13d5ddb90495820f9cb259 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 26 Apr 2018 11:19:25 -0400 Subject: MM-10232, MM-10259: Improve error handling from invalid json (#8668) * MM-10232: improve error handling from malformed slash command responses Switch to json.Unmarshal, which doesn't obscure JSON parse failures like json.Decode. The latter is primarily designed for streams of JSON, not necessarily unmarshalling just a single object. * rework HumanizedJsonError to expose Line and Character discretely * MM-10259: pinpoint line and character where json config error occurs * tweak HumanizeJsonError to accept err first --- i18n/en.json | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'i18n') diff --git a/i18n/en.json b/i18n/en.json index 9f6d972af..c99d582f2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4686,6 +4686,10 @@ "id": "model.channel_member_history.is_valid.user_id.app_error", "translation": "Invalid user id" }, + { + "id": "model.client.command.parse.app_error", + "translation": "Unable to parse incoming data" + }, { "id": "model.client.connecting.app_error", "translation": "We encountered an error while connecting to the server" -- cgit v1.2.3-1-g7c22