(data)
| 404 | } |
| 405 | |
| 406 | function extractSecretDivergenceReason(data) { |
| 407 | const candidates = [ |
| 408 | data?.payload?.reason, |
| 409 | data?.payload?.error, |
| 410 | data?.reason, |
| 411 | data?.error, |
| 412 | ]; |
| 413 | for (const value of candidates) { |
| 414 | const reason = matchSecretDivergenceReason(value); |
| 415 | if (reason) return reason; |
| 416 | } |
| 417 | return null; |
| 418 | } |
| 419 | |
| 420 | function isSecretDivergenceError(error) { |
| 421 | return error === SECRET_DIVERGENCE_ERROR || Boolean(matchSecretDivergenceReason(error)); |
no test coverage detected