diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b16c6..29c0f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [3.1.3] - 2024-04-18 +### Fixed +- JSON parsing error is shown when deleting account + +### Security +- chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 by @dependabot in #53 +- chore(deps): bump express from 4.18.2 to 4.19.2 by @dependabot in #54 + +## [3.1.2] - 2024-03-20 +### Security +- chore(deps): bump @babel/traverse from 7.22.8 to 7.23.2 by @dependabot in #46 +- chore(deps-dev): bump postcss from 8.4.19 to 8.4.31 by @dependabot in #45 +- chore(deps): bump follow-redirects from 1.15.2 to 1.15.6 by @dependabot in #51 + +### Internal +- Added Dockerfile + ## [3.1.1] - 2023-09-12 ### Fixed @@ -48,7 +65,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Merge pull request #9 from privacybydesign/firefox-fix - Fix: remove invalid fallback URL to solve issues on Firefox for Android -[3.1.1]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v3.0.0...v3.1.1 +[3.1.3]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v3.1.2...v3.1.3 +[3.1.2]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v3.1.1...v3.1.2 +[3.1.1]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v3.1.0...v3.1.1 [3.1.0]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v3.0.0...v3.1.0 [3.0.0]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v2.0.3...v3.0.0 [2.0.3]: https://github.com/privacybydesign/irma_keyshare_webclient/compare/v2.0.2...v2.0.3 diff --git a/package.json b/package.json index ea0b6da..a0dfd5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "myirma", - "version": "3.1.2", + "version": "3.1.3", "private": true, "dependencies": { "@privacybydesign/yivi-frontend": "^0.1.0", diff --git a/src/store/index.js b/src/store/index.js index dee0352..ebe7c97 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -95,19 +95,22 @@ function handleDeleteAccount({ dispatch }) { method: 'POST', credentials: 'include', }) - .then((res) => res.json()) .then((res) => { if (res.status === 204) { dispatch({ type: 'logout' }); - } else if (res.status === 500 && res.error === 'REVALIDATE_EMAIL') { - dispatch({ - type: 'raiseWarning', - explanation: 'delete-account-mail-explanation', - details: 'delete-account-mail-details', - }); - } else { - throw res.status; + return res; } + return res.json().then((resjson) => { + if (res.status === 500 && resjson.error === 'REVALIDATE_EMAIL') { + dispatch({ + type: 'raiseWarning', + explanation: 'delete-account-mail-explanation', + details: 'delete-account-mail-details', + }); + } else { + throw res.status; + } + }); }) .catch((err) => { dispatch({ type: 'raiseError', errorMessage: `Error while deleting account: ${err}` });