Add RateLimit information
This commit is contained in:
parent
e3c40356bc
commit
190def95da
|
@ -17,7 +17,7 @@ custom_error! {
|
|||
ReceivedErrorCodeError{error_code:String} = "Received the following error code while requesting from the route: {error_code}",
|
||||
CantGetInfoError{error:String} = "Something seems to be wrong with the instance. Cannot get information about the instance: {error}",
|
||||
InvalidFormBodyError{error_type: String, error:String} = "The server responded with: {error_type}: {error}",
|
||||
RateLimited = "Ratelimited.",
|
||||
RateLimited{bucket:String} = "Ratelimited on Bucket {bucket}",
|
||||
MultipartCreationError{error: String} = "Got an error whilst creating the form: {}",
|
||||
TokenExpired = "Token expired, invalid or not found.",
|
||||
NoPermission = "You do not have the permissions needed to perform this action.",
|
||||
|
|
|
@ -115,7 +115,9 @@ impl LimitedRequester {
|
|||
request,
|
||||
limit_type,
|
||||
});
|
||||
Err(InstanceServerError::RateLimited)
|
||||
Err(InstanceServerError::RateLimited {
|
||||
bucket: limit_type.to_string(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue