SIGN IN SIGN UP

fix: parse email verification id in exception (#485)

* Add email_verification_id field to BaseRequestException

Fixes #309

When authenticate_with_password() raises an AuthorizationException for an
unverified email, the API response includes an email_verification_id field.
This field is now properly extracted and accessible on the exception object,
eliminating the need to manually parse the response JSON.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* Replace base exception field with specific EmailVerificationRequiredException

- Created EmailVerificationRequiredException subclass of AuthorizationException
- Added email_verification_id field specific to this exception type
- Updated HTTP client to detect email_verification_required error code and raise specific exception
- Added tests for both the new exception and to verify regular AuthorizationException still works
- All 370 tests pass

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
D
Deep Singhvi committed
b9a93d4a3853ce9f20d2e85b6dcde761b80dcdf1
Parent: 80ef9b9
Committed by GitHub <noreply@github.com> on 10/15/2025, 8:16:18 PM