File tree Expand file tree Collapse file tree 3 files changed +18
-26
lines changed Expand file tree Collapse file tree 3 files changed +18
-26
lines changed Original file line number Diff line number Diff line change 28206
28206
},
28207
28207
{
28208
28208
"code": 420,
28209
- "type": "P0NY_FLOODWAIT",
28210
- "description": " "
28209
+ "type": "P0NY_FLOODWAIT"
28211
28210
},
28212
28211
{
28213
28212
"code": 400,
28408
28407
"description": "The provided peer id is invalid"
28409
28408
},
28410
28409
{
28411
- "code": 503,
28412
- "type": "TIMEOUT ",
28410
+ "code": - 503,
28411
+ "type": "Timeout ",
28413
28412
"description": "Timeout while fetching data"
28414
28413
}
28415
28414
]
28936
28935
"description": "Invalid message ID provided"
28937
28936
},
28938
28937
{
28939
- "code": 503,
28940
- "type": "TIMEOUT ",
28938
+ "code": - 503,
28939
+ "type": "Timeout ",
28941
28940
"description": "Timeout while fetching data"
28942
28941
}
28943
28942
]
29286
29285
"errors": [
29287
29286
{
29288
29287
"code": 403,
29289
- "type": "BROADCAST_FORBIDDEN",
29290
- "description": " "
29288
+ "type": "BROADCAST_FORBIDDEN"
29291
29289
},
29292
29290
{
29293
29291
"code": 400,
34291
34289
},
34292
34290
"BROADCAST_FORBIDDEN": {
34293
34291
"code": 403,
34294
- "type": "BROADCAST_FORBIDDEN",
34295
- "description": " "
34292
+ "type": "BROADCAST_FORBIDDEN"
34296
34293
},
34297
34294
"BROADCAST_ID_INVALID": {
34298
34295
"code": 400,
34986
34983
},
34987
34984
"P0NY_FLOODWAIT": {
34988
34985
"code": 420,
34989
- "type": "P0NY_FLOODWAIT",
34990
- "description": " "
34986
+ "type": "P0NY_FLOODWAIT"
34991
34987
},
34992
34988
"PACK_SHORT_NAME_INVALID": {
34993
34989
"code": 400,
35479
35475
"type": "THEME_INVALID",
35480
35476
"description": "Invalid theme provided"
35481
35477
},
35482
- "TIMEOUT": {
35483
- "code": 503,
35484
- "type": "TIMEOUT",
35485
- "description": "Timeout while fetching data"
35486
- },
35487
35478
"TMP_PASSWORD_DISABLED": {
35488
35479
"code": 400,
35489
35480
"type": "TMP_PASSWORD_DISABLED",
35509
35500
"type": "TYPES_EMPTY",
35510
35501
"description": "No top peer type was provided"
35511
35502
},
35503
+ "Timeout": {
35504
+ "code": -503,
35505
+ "type": "Timeout",
35506
+ "description": "Timeout while fetching data"
35507
+ },
35512
35508
"UNTIL_DATE_INVALID": {
35513
35509
"code": 400,
35514
35510
"type": "UNTIL_DATE_INVALID",
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ type Method struct {
23
23
type Error struct {
24
24
Code int `json:"code"`
25
25
Type string `json:"type"`
26
- Description string `json:"description"`
26
+ Description string `json:"description,omitempty "`
27
27
}
28
28
29
29
func docBotCanUser (doc * goquery.Document ) bool {
@@ -49,12 +49,8 @@ func docErrors(doc *goquery.Document) []Error {
49
49
}
50
50
e := Error {
51
51
Code : code ,
52
- Type : strings .ToUpper (rowContents [1 ]),
53
- Description : rowContents [2 ],
54
- }
55
- if e .Code < 0 {
56
- // Normalize code. Correct value is positive.
57
- e .Code *= - 1
52
+ Type : strings .TrimSpace (rowContents [1 ]),
53
+ Description : strings .TrimSpace (rowContents [2 ]),
58
54
}
59
55
output = append (output , e )
60
56
})
You can’t perform that action at this time.
0 commit comments