mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +00:00
Friendlier exceptions for Auth testing
This change also lets you write the auth code in the app.config file without the need to recompile/debug.
This commit is contained in:
parent
b0b58be25e
commit
f062c0a7a1
4 changed files with 32 additions and 2 deletions
|
|
@ -293,6 +293,10 @@ namespace TLSharp.Core.Network
|
|||
var dcIdx = int.Parse(resultString);
|
||||
throw new UserMigrationException(dcIdx);
|
||||
}
|
||||
else if (errorMessage == "PHONE_CODE_INVALID")
|
||||
{
|
||||
throw new InvalidPhoneCodeException("The numeric code used to authenticate does not match the numeric code sent by SMS/Telegram");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException(errorMessage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue