Skip to content

Add additional test and remove dead code#131

Merged
nporter-adbe merged 4 commits intoadobe:devfrom
nporter-adbe:addFatalErrorTest
Jan 14, 2021
Merged

Add additional test and remove dead code#131
nporter-adbe merged 4 commits intoadobe:devfrom
nporter-adbe:addFatalErrorTest

Conversation

@nporter-adbe
Copy link
Copy Markdown
Contributor

This adds a real fatal error response test I received from Konductor by providing an invalid config id. This PR doesn't fix any bugs, but rather adds a new test and does some minor clean up.

I also took a minute to take another look at some of the decoding code, and realized that the decoding within the guard is redundant, and checking if errors is nil is sufficient. In the case a generic fetal error is returned, it will end up decoding into a nil EdgeErrorResponse, then when we check redgeErrorResponse.errors we'll realize that we need to decode it as a generic error.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 13, 2021

Codecov Report

Merging #131 (1c4b239) into dev (036beed) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #131      +/-   ##
==========================================
+ Coverage   93.08%   93.18%   +0.10%     
==========================================
  Files          18       18              
  Lines         578      601      +23     
==========================================
+ Hits          538      560      +22     
- Misses         40       41       +1     

@nporter-adbe
Copy link
Copy Markdown
Contributor Author

Elected to just re-write the entire processResponseOnError function.

@nporter-adbe nporter-adbe merged commit d590e81 into adobe:dev Jan 14, 2021
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