diff --git a/src/PostgREST/Error.hs b/src/PostgREST/Error.hs index 03aa8523d..e7893aa0b 100644 --- a/src/PostgREST/Error.hs +++ b/src/PostgREST/Error.hs @@ -30,7 +30,7 @@ instance JSON.ToJSON P.UsageError where "code" .= ("" :: T.Text), "message" .= ("Connection error" :: T.Text), "details" .= (cs (fromMaybe "" e) :: T.Text)] - toJSON e = JSON.toJSON e -- H.Error + toJSON (P.SessionError e) = JSON.toJSON e -- H.Error instance JSON.ToJSON H.Error where toJSON (H.ResultError (H.ServerError c m d h)) = JSON.object [