Skip to content

fix(dynamic-error): removed side effects to keep error cases consistent#90

Merged
asadali214 merged 3 commits intorelease-0.4-patchesfrom
fix-dynamic-error-template-replacement
Jan 30, 2024
Merged

fix(dynamic-error): removed side effects to keep error cases consistent#90
asadali214 merged 3 commits intorelease-0.4-patchesfrom
fix-dynamic-error-template-replacement

Conversation

@asadali214
Copy link
Copy Markdown
Collaborator

@asadali214 asadali214 commented Jan 30, 2024

What

This PR adds a new method getReason in ErrorCase that replace replacePlaceHolder method. The getReason method returns a new error reason instead of replacing the placeHolders in the original reason.

Why

We needed to make sure that the GlobalConfigurations are not updated on performing any API Calls

Closes #89

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

If a new dependency is being added, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Policy-of-adding-new-dependencies-in-the-core-libraries

Breaking change

If the PR is introducing a breaking change, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Guidelines-for-maintaining-core-libraries

Testing

List the steps that were taken to test the changes

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@asadali214 asadali214 self-assigned this Jan 30, 2024
Comment thread src/main/java/io/apimatic/core/ErrorCase.java Outdated
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Copy Markdown
Collaborator

@sufyankhanrao sufyankhanrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asadali214 asadali214 merged commit d2b3ea1 into release-0.4-patches Jan 30, 2024
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.

2 participants