We now check if the error is 4xx and is not supported error in utils which is where defaultErorHandler have been moved. If yes, then we throw the error from Commons.js
Removed unsupported error configs from all connector.js configs as we now have default case which takes of it
Removed duplicate getValueByKey() as we now re-use the existing ones from utils
Removed unused variables
Used loops where ever possible
logRequestId() could not moved to utils as the cy.task() used in that function can only be used in either spec file or helper file (commands.js)
Description
This is a following PR of https://github.com/juspay/hyperswitch/pull/5093 that implements significant changes to the way Cypress handles
4xx
errors. Will go through it one by one:not supported
error in utils which is wheredefaultErorHandler
have been moved. If yes, then we throw the error fromCommons.js
unsupported error
configs from allconnector.js
configs as we now have default case which takes of itgetValueByKey()
as we now re-use the existing ones from utilslogRequestId()
could not moved to utils as thecy.task()
used in that function can only be used in eitherspec
file orhelper
file (commands.js
)55ae0b1
(#5128)Additional Changes
Motivation and Context
NIL
How did you test it?
After commit
7fac187
(#5128)NMI PMID 2 failures are backend issues and @likhinbopanna is behind it.
Checklist
prettier . --write
cargo clippy