Skip to content

Commit

Permalink
Update Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitguigal committed Nov 16, 2020
1 parent b9cb866 commit cbe2cdd
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -16,6 +16,7 @@ et le projet suit un schéma de versionning inspiré de [Calendar Versioning](ht
#### :bug: Corrections de bugs

- Correction de la mutation `duplicateForm` pour dupliquer l'entreposage provisoire, [PR 700](https://github.com/)
- Correction d'un bug affichant une erreur serveur à la place d'une erreur de validation graphQL lorsque le typage des variables graphQL est erronée [PR 711](https://github.com/MTES-MCT/trackdechets/pull/711)

#### :nail_care: Améliorations

Expand Down
176 changes: 172 additions & 4 deletions back/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion back/src/__tests__/errors.integration.ts
Expand Up @@ -160,7 +160,7 @@ describe("Error handling", () => {
process.env.NODE_ENV = "production";
const server = require("../server").server;
const { mutate } = createTestClient(server);
// invalid variables `toto` instead of `input`
// invalid variable `toto` instead of `input`
const variables = { toto: "toto" };
const { errors } = await mutate({
mutation: BAR,
Expand Down
2 changes: 1 addition & 1 deletion back/src/server.ts
Expand Up @@ -128,7 +128,7 @@ export const server = new ApolloServer({
// Workaround for graphQL validation error displayed as internal server error
// when graphQL variables are of of invalid type
// See: https://github.com/apollographql/apollo-server/issues/3498
if (err.message.startsWith(`Variable "`)) {
if (err.message && err.message.startsWith(`Variable "`)) {
err.extensions.code = "GRAPHQL_VALIDATION_FAILED";
return err;
}
Expand Down

0 comments on commit cbe2cdd

Please sign in to comment.