feat(graphql): add error codes to graphql errors

This commit is contained in:
Paul Chavard 2023-04-18 09:48:38 +02:00
parent 2a09f1d505
commit fbae6d941d
5 changed files with 37 additions and 11 deletions

View file

@ -684,7 +684,7 @@ describe API::V2::GraphqlController do
end
it "should return an error" do
expect(gql_errors).to eq([{ message: "Cannot return null for non-nullable field PersonneMorale.siegeSocial" }])
expect(gql_errors).to eq([{ message: "Cannot return null for non-nullable field PersonneMorale.siegeSocial", extensions: { code: "invalid_null" } }])
end
end
end