Skip to content

Commit

Permalink
fix: crash when registering with a registered email - WPB-14566 (#2224)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Aldrian <[email protected]>
Co-authored-by: Christoph Aldrian <[email protected]>
  • Loading branch information
3 people authored Nov 28, 2024
1 parent 8fe98e1 commit 7089658
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ extension RegistationCredentialVerificationStrategy: ZMSingleRequestTranscoder {
error = NSError.invalidActivationCode(with: response) ??
NSError(userSessionErrorCode: .unknownError, userInfo: [:])
default:
// We can end up here because more than one request can be sent for a single action/phase.
// This is an issue in some other part of SyncEngine but as a quick fix we will log and abort here.
let phaseString = registrationStatus.phase.map { "\($0)" } ?? "<nil>"
fatal("Error occurs for invalid phase: \(phaseString)")
WireLogger.authentication.error("Recieved unsuccessful response for invalid phase (\(phaseString))", attributes: .safePublic)
return assertionFailure("Error occurs for invalid phase: \(phaseString)")
}
registrationStatus.handleError(error)
}
Expand Down

0 comments on commit 7089658

Please sign in to comment.