Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update unit tests to test uniform error handling over APIs #1079

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

wboereboom
Copy link
Contributor

Description
The error format is not uniform over all our different APIs.
This PR updates our unit testing to confirm the error handling is the same between these different formats

Tested scenarios
unit testing

@wboereboom wboereboom requested a review from a team as a code owner January 9, 2023 16:20
@sonarcloud
Copy link

sonarcloud bot commented Jan 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@AlexandrosMor AlexandrosMor merged commit bd70b93 into develop Jan 13, 2023
@AlexandrosMor AlexandrosMor deleted the PW-7673/error_handling branch January 13, 2023 14:54
jillingk added a commit that referenced this pull request Jan 20, 2023
* Bump @typescript-eslint/eslint-plugin from 5.41.0 to 5.43.0 (#1039)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.41.0 to 5.43.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.43.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add renovate.json (#1042)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v27.5.2 (#1043)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Arribatec/fix terminal comms typo (#1029)

* Fix the namings of CommunicationOKFlag

* Revert "Fix the namings of CommunicationOKFlag"

This reverts commit 15e85c2.

* Updated with correct linting

* Update pOIStatus.ts

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* Update dependency eslint to v8.27.0 (#1047)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @typescript-eslint/parser to v5.43.0 (#1046)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Changed name of Value to BarcodeValue corresponding to docs(and API) (#1051)

* Update actions/setup-node action to v3 (#1053)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 5.43.0 to 5.45.0 (#1067)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.43.0 to 5.45.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.45.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update actions/checkout action to v3 (#1052)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* add dataProtection service to library (#1063)

* add dataProtection service to library

* add missing import

* fix mock class for unit test

* fix: add balancePlatform to services index (#1068)

* Delete dependabot.yml (#1059)

* Update dependency eslint to v8.28.0 (#1057)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency typescript to v4.9.3 (#1050)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency ts-loader to v9 (#1055)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update .npmignore (#1072)

* Pw 7156/update readme (#1069)

* update README

* fix link to integration section

* add webhooks to README.md

* fix bullet lists in README

* minor code example fix

* process feedback

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Grammar

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Add banner to README (#1074)

* Update dependency typescript to v4.9.4 (#1073)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add basic auth option to the client (#1076)

* remove API calls from unit tests. Remove ASCII headers from test files, use typings index in test classes. add missing entries to typings index class (#1075)

* PW-7502: Bind QueryString type to URLSearchParams (#1077)

* chore(deps): update dependency @types/node to v14.18.36 (#1044)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency nock to v13.3.0 (#1081)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update unit tests to test uniform error handling over APIs (#1079)

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* Remove LGTM badges from README (#1080)

* PW-7514: Fully Generated Management API client (#1064)

* PW-7514: Update models

* PW-7514: Switch to JAR based installation

* PW-7514: Default API template

* PW-7514: Customize API template

* PW-7514: Serialize request

* PW-7514: Query string

* PW-7514: Fix version patch

* PW-7514: Client generated

* PW-7514: Export class by default

* PW-7514: Make path and body params required

* PW-7514: Dynamic service name

* PW-7514: Link all classes into one parent

* PW-7514: Dynamic method names

* PW-7514: Fix merge issues

* PW-7514: Generate using latest specs

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* [PW-7765] add create/disablePermit and simple UT (#1082)

* add create/disablePermit and simple UT

* Add serializer for Date objects and quick test

Co-authored-by: Michael Paul <michael@michaelpaul.com.br>

* Update package.json (#1084)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eoin Falconer <eoin.falconer@hotmail.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>
Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>
Co-authored-by: Michael Paul <michael@michaelpaul.com.br>
wboereboom added a commit that referenced this pull request Feb 13, 2023
* Bump @typescript-eslint/eslint-plugin from 5.41.0 to 5.43.0 (#1039)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.41.0 to 5.43.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.43.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add renovate.json (#1042)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v27.5.2 (#1043)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Arribatec/fix terminal comms typo (#1029)

* Fix the namings of CommunicationOKFlag

* Revert "Fix the namings of CommunicationOKFlag"

This reverts commit 15e85c2.

* Updated with correct linting

* Update pOIStatus.ts

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* Update dependency eslint to v8.27.0 (#1047)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @typescript-eslint/parser to v5.43.0 (#1046)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Changed name of Value to BarcodeValue corresponding to docs(and API) (#1051)

* Update actions/setup-node action to v3 (#1053)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 5.43.0 to 5.45.0 (#1067)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.43.0 to 5.45.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.45.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update actions/checkout action to v3 (#1052)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* add dataProtection service to library (#1063)

* add dataProtection service to library

* add missing import

* fix mock class for unit test

* fix: add balancePlatform to services index (#1068)

* Delete dependabot.yml (#1059)

* Update dependency eslint to v8.28.0 (#1057)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency typescript to v4.9.3 (#1050)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency ts-loader to v9 (#1055)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update .npmignore (#1072)

* Pw 7156/update readme (#1069)

* update README

* fix link to integration section

* add webhooks to README.md

* fix bullet lists in README

* minor code example fix

* process feedback

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Grammar

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Add banner to README (#1074)

* Update dependency typescript to v4.9.4 (#1073)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add basic auth option to the client (#1076)

* remove API calls from unit tests. Remove ASCII headers from test files, use typings index in test classes. add missing entries to typings index class (#1075)

* PW-7502: Bind QueryString type to URLSearchParams (#1077)

* chore(deps): update dependency @types/node to v14.18.36 (#1044)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency nock to v13.3.0 (#1081)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update unit tests to test uniform error handling over APIs (#1079)

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* Remove LGTM badges from README (#1080)

* PW-7514: Fully Generated Management API client (#1064)

* PW-7514: Update models

* PW-7514: Switch to JAR based installation

* PW-7514: Default API template

* PW-7514: Customize API template

* PW-7514: Serialize request

* PW-7514: Query string

* PW-7514: Fix version patch

* PW-7514: Client generated

* PW-7514: Export class by default

* PW-7514: Make path and body params required

* PW-7514: Dynamic service name

* PW-7514: Link all classes into one parent

* PW-7514: Dynamic method names

* PW-7514: Fix merge issues

* PW-7514: Generate using latest specs

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* [PW-7765] add create/disablePermit and simple UT (#1082)

* add create/disablePermit and simple UT

* Add serializer for Date objects and quick test

Co-authored-by: Michael Paul <michael@michaelpaul.com.br>

* Update package.json (#1084)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eoin Falconer <eoin.falconer@hotmail.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>
Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>
Co-authored-by: Michael Paul <michael@michaelpaul.com.br>
wboereboom added a commit that referenced this pull request Feb 13, 2023
* Bump @typescript-eslint/eslint-plugin from 5.41.0 to 5.43.0 (#1039)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.41.0 to 5.43.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.43.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add renovate.json (#1042)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @types/jest to v27.5.2 (#1043)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Arribatec/fix terminal comms typo (#1029)

* Fix the namings of CommunicationOKFlag

* Revert "Fix the namings of CommunicationOKFlag"

This reverts commit 15e85c2.

* Updated with correct linting

* Update pOIStatus.ts

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* Update dependency eslint to v8.27.0 (#1047)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @typescript-eslint/parser to v5.43.0 (#1046)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Changed name of Value to BarcodeValue corresponding to docs(and API) (#1051)

* Update actions/setup-node action to v3 (#1053)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 5.43.0 to 5.45.0 (#1067)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.43.0 to 5.45.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.45.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update actions/checkout action to v3 (#1052)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>

* add dataProtection service to library (#1063)

* add dataProtection service to library

* add missing import

* fix mock class for unit test

* fix: add balancePlatform to services index (#1068)

* Delete dependabot.yml (#1059)

* Update dependency eslint to v8.28.0 (#1057)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency typescript to v4.9.3 (#1050)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency ts-loader to v9 (#1055)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update .npmignore (#1072)

* Pw 7156/update readme (#1069)

* update README

* fix link to integration section

* add webhooks to README.md

* fix bullet lists in README

* minor code example fix

* process feedback

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Update README.md

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Grammar

Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>

* Add banner to README (#1074)

* Update dependency typescript to v4.9.4 (#1073)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* add basic auth option to the client (#1076)

* remove API calls from unit tests. Remove ASCII headers from test files, use typings index in test classes. add missing entries to typings index class (#1075)

* PW-7502: Bind QueryString type to URLSearchParams (#1077)

* chore(deps): update dependency @types/node to v14.18.36 (#1044)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency nock to v13.3.0 (#1081)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* update unit tests to test uniform error handling over APIs (#1079)

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* Remove LGTM badges from README (#1080)

* PW-7514: Fully Generated Management API client (#1064)

* PW-7514: Update models

* PW-7514: Switch to JAR based installation

* PW-7514: Default API template

* PW-7514: Customize API template

* PW-7514: Serialize request

* PW-7514: Query string

* PW-7514: Fix version patch

* PW-7514: Client generated

* PW-7514: Export class by default

* PW-7514: Make path and body params required

* PW-7514: Dynamic service name

* PW-7514: Link all classes into one parent

* PW-7514: Dynamic method names

* PW-7514: Fix merge issues

* PW-7514: Generate using latest specs

Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com>

* [PW-7765] add create/disablePermit and simple UT (#1082)

* add create/disablePermit and simple UT

* Add serializer for Date objects and quick test

Co-authored-by: Michael Paul <michael@michaelpaul.com.br>

* Update package.json (#1084)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eoin Falconer <eoin.falconer@hotmail.com>
Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com>
Co-authored-by: Jeantwan Teuma <Morerice@users.noreply.github.com>
Co-authored-by: Michael Paul <michael@michaelpaul.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants