mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: handle grpc error
This commit is contained in:
@@ -102,6 +102,11 @@ class GrpcRepo {
|
||||
try {
|
||||
return await request();
|
||||
} catch (e) {
|
||||
if (e is GrpcError) {
|
||||
if (e.message == '12061') {
|
||||
return {'status': false, 'msg': 'UP主已关闭评论区'}; // to be comfirm
|
||||
}
|
||||
}
|
||||
return {'status': false, 'msg': e.toString()};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user