Added error descriptions
This commit is contained in:
parent
84d25bfaa2
commit
6720199a33
|
@ -71,7 +71,7 @@ class AuthKeyHandler extends AckHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($public_key_fingerprint)) {
|
if (!isset($public_key_fingerprint)) {
|
||||||
throw new Exception("couldn't find our key in the server_public_key_fingerprints vector.");
|
throw new Exception("Couldn't find our key in the server_public_key_fingerprints vector.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$pq_bytes = $ResPQ['pq'];
|
$pq_bytes = $ResPQ['pq'];
|
||||||
|
|
|
@ -41,7 +41,20 @@ class ResponseHandler extends MsgIdHandler
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bad_msg_notification':
|
case 'bad_msg_notification':
|
||||||
throw new Exception('Received bad_msg_notification '.var_export($response, true));
|
$error_codes = [
|
||||||
|
16 => 'msg_id too low (most likely, client time is wrong; it would be worthwhile to synchronize it using msg_id notifications and re-send the original message with the “correct” msg_id or wrap it in a container with a new msg_id if the original message had waited too long on the client to be transmitted)',
|
||||||
|
17 => 'msg_id too high (similar to the previous case, the client time has to be synchronized, and the message re-sent with the correct msg_id)',
|
||||||
|
18 => 'incorrect two lower order msg_id bits (the server expects client message msg_id to be divisible by 4)',
|
||||||
|
19 => 'container msg_id is the same as msg_id of a previously received message (this must never happen)',
|
||||||
|
20 => 'message too old, and it cannot be verified whether the server has received a message with this msg_id or not',
|
||||||
|
32 => 'msg_seqno too low (the server has already received a message with a lower msg_id but with either a higher or an equal and odd seqno)',
|
||||||
|
33 => 'msg_seqno too high (similarly, there is a message with a higher msg_id but with either a lower or an equal and odd seqno)',
|
||||||
|
34 => 'an even msg_seqno expected (irrelevant message), but odd received',
|
||||||
|
35 => 'odd msg_seqno expected (relevant message), but even received',
|
||||||
|
48 => 'incorrect server salt (in this case, the bad_server_salt response is received with the correct salt, and the message is to be re-sent with it)',
|
||||||
|
64 => 'invalid container.',
|
||||||
|
];
|
||||||
|
throw new Exception('Received bad_msg_notification for '.$response['bad_msg_id'].': '.$error_codes[$response['error_code']]);
|
||||||
break;
|
break;
|
||||||
case 'bad_server_salt':
|
case 'bad_server_salt':
|
||||||
$this->settings['authorization']['temp_auth_key']['server_salt'] = $response['new_server_salt'];
|
$this->settings['authorization']['temp_auth_key']['server_salt'] = $response['new_server_salt'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user