refactor: rename JSONParseError to PGRSTParseError

The error name is too generic otherwise.
This commit is contained in:
steve-chavez
2023-10-06 01:16:45 -03:00
committed by Steve Chavez
parent 3dd292be46
commit df08d7f3ff
2 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -1537,17 +1537,17 @@ spec actualPgVersion =
resHeaders `shouldSatisfy` elem ("X-Header", "str")
resBody `shouldBe` [json|{"code":"123","message":"ABC","details":null,"hint":null}|]
it "returns JSONParseError for invalid JSON in RAISE Message field" $
it "returns error for invalid JSON in RAISE Message field" $
get "/rpc/raise_sqlstate_invalid_json_message" `shouldRespondWith`
[json|{"code":"PGRST121","message":"The message and detail field of RAISE 'PGRST' error expects JSON","details":null,"hint":null}|]
{ matchStatus = 500 }
it "returns JSONParseError for invalid JSON in RAISE Details field" $
it "returns error for invalid JSON in RAISE Details field" $
get "/rpc/raise_sqlstate_invalid_json_details" `shouldRespondWith`
[json|{"code":"PGRST121","message":"The message and detail field of RAISE 'PGRST' error expects JSON","details":null,"hint":null}|]
{ matchStatus = 500 }
it "returns JSONParseError for missing Details field in RAISE" $
it "returns error for missing Details field in RAISE" $
get "/rpc/raise_sqlstate_missing_details" `shouldRespondWith`
[json|{"code":"PGRST121","message":"The message and detail field of RAISE 'PGRST' error expects JSON","details":null,"hint":null}|]
{ matchStatus = 500 }