From 0606c6932786e1a771e9d012bcbaa5f1fec44667 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Fri, 25 Nov 2022 19:18:14 +0000 Subject: [PATCH] Dropped the unknown column hint after PR feedback. --- src/PostgREST/Error.hs | 2 +- test/spec/Feature/Query/InsertSpec.hs | 2 +- test/spec/Feature/Query/UpdateSpec.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PostgREST/Error.hs b/src/PostgREST/Error.hs index 5466555cd8..aa7975132b 100644 --- a/src/PostgREST/Error.hs +++ b/src/PostgREST/Error.hs @@ -201,7 +201,7 @@ instance JSON.ToJSON ApiRequestError where "code" .= ApiRequestErrorCode18, "message" .= ("Could not find '" <> colName <> "' in the target table" :: Text), "details" .= JSON.Null, - "hint" .= ("If a new column was created in the database with this name, try reloading the schema cache." :: Text)] + "hint" .= JSON.Null] compressedRel :: Relationship -> JSON.Value -- An ambiguousness error cannot happen for computed relationships TODO refactor so this mempty is not needed diff --git a/test/spec/Feature/Query/InsertSpec.hs b/test/spec/Feature/Query/InsertSpec.hs index 21caff529e..33445fadf2 100644 --- a/test/spec/Feature/Query/InsertSpec.hs +++ b/test/spec/Feature/Query/InsertSpec.hs @@ -426,7 +426,7 @@ spec actualPgVersion = do {"id": 204, "body": "yyy"}, {"id": 205, "body": "zzz"}]|] `shouldRespondWith` - [json|{"code":"PGRST118","details":null,"hint":"If a new column was created in the database with this name, try reloading the schema cache.","message":"Could not find 'helicopter' in the target table"} |] + [json|{"code":"PGRST118","details":null,"hint":null,"message":"Could not find 'helicopter' in the target table"} |] { matchStatus = 400 , matchHeaders = [] } diff --git a/test/spec/Feature/Query/UpdateSpec.hs b/test/spec/Feature/Query/UpdateSpec.hs index c02dab0444..b53ed6704d 100644 --- a/test/spec/Feature/Query/UpdateSpec.hs +++ b/test/spec/Feature/Query/UpdateSpec.hs @@ -313,7 +313,7 @@ spec = do [("Prefer", "return=representation")] [json|{"body": "yyy"}|] `shouldRespondWith` - [json|{"code":"PGRST118","details":null,"hint":"If a new column was created in the database with this name, try reloading the schema cache.","message":"Could not find 'helicopter' in the target table"} |] + [json|{"code":"PGRST118","details":null,"hint":null,"message":"Could not find 'helicopter' in the target table"} |] { matchStatus = 400 , matchHeaders = [] }