Move json_error to error.message and error.type#4167
Conversation
There was a problem hiding this comment.
Does this have to be exported? Seems simple enough to replicate if we need it elsewhere, similar to the debug function calls.
There was a problem hiding this comment.
I exported it because I also use it in the json reader. But I can also just copy / paste the code to the json reader.
tsg
left a comment
There was a problem hiding this comment.
LGTM. See tiny comment and please add PR number to changelog.
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported function WriteJSONKeys should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported function CreateJSONError should have comment or be unexported
|
PR added, function duplicated and golint errors fixed. |
|
jenkins, retest it |
e480942 to
840e1e7
Compare
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported function WriteJSONKeys should be of the form "WriteJSONKeys ..."
a578ca5 to
183e793
Compare
All errors are now under the error namespace. This should also be true for json errors. Currently they are put under `json_error`. This PR changes it to `error.message` and `error.type: json`. This makes it easy to search for all json errors. This is a breaking change. * Docs updated * Tests updated The naming of the config option was not touched for better backward compatibility.
All errors are now under the error namespace. This should also be true for json errors. Currently they are put under
json_error. This PR changes it toerror.messageanderror.type: json. This makes it easy to search for all json errors. This is a breaking change.The naming of the config option was not touched for better backward compatibility.