mirror of
https://github.com/vacp2p/specs.git
synced 2026-01-08 23:08:09 -05:00
add error reporting to DiscoverResponse; status text for errors.
and some more error codes.
This commit is contained in:
@@ -158,16 +158,19 @@ message Message {
|
||||
optional int64 ttl = 3; // in seconds
|
||||
}
|
||||
|
||||
enum RegisterStatus {
|
||||
OK = 0;
|
||||
enum ResponseStatus {
|
||||
OK = 0;
|
||||
E_INVALID_NAMESPACE = 100;
|
||||
E_INVALID_PEER_INFO = 101;
|
||||
E_INVALID_TTL = 102;
|
||||
E_INVALID_COOKIE = 103;
|
||||
E_NOT_AUTHORIZED = 200;
|
||||
E_INTERNAL_ERROR = 300;
|
||||
}
|
||||
|
||||
message RegisterResponse {
|
||||
optional RegisterStatus status = 1;
|
||||
optional ResponseStatus status = 1;
|
||||
optional string statusText = 2;
|
||||
}
|
||||
|
||||
message Unregister {
|
||||
@@ -184,6 +187,8 @@ message Message {
|
||||
message DiscoverResponse {
|
||||
repeated Register registrations = 1;
|
||||
optional bytes cookie = 2;
|
||||
optional ResponseStatus status = 3;
|
||||
optional string statusText = 4;
|
||||
}
|
||||
|
||||
optional MessageType type = 1;
|
||||
|
||||
Reference in New Issue
Block a user