1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Be consistent with other responses

This commit is contained in:
Timothy Clem 2018-11-10 09:40:19 -08:00
parent bc9f85fdef
commit 09e6046763

View File

@ -102,7 +102,7 @@ renderJSONError Blob{..} e = JSON [ SomeJSON (object [ "error" .= err ]) ]
renderJSONDiffError :: BlobPair -> String -> JSON "diffs" SomeJSON renderJSONDiffError :: BlobPair -> String -> JSON "diffs" SomeJSON
renderJSONDiffError pair e = JSON [ SomeJSON (object [ "error" .= err ]) ] renderJSONDiffError pair e = JSON [ SomeJSON (object [ "error" .= err ]) ]
where err = object ["message" .= e, "info" .= toJSON (JSONStat pair)] where err = object ["message" .= e, "stat" .= toJSON (JSONStat pair)]
data SomeJSON where data SomeJSON where
SomeJSON :: ToJSON a => a -> SomeJSON SomeJSON :: ToJSON a => a -> SomeJSON