Relaxed rate limiting on icon search, improved error messaging
This commit is contained in:
@@ -71,8 +71,8 @@ const findIcons = new ValidatedMethod({
|
|||||||
}).validator(),
|
}).validator(),
|
||||||
mixins: [RateLimiterMixin],
|
mixins: [RateLimiterMixin],
|
||||||
rateLimit: {
|
rateLimit: {
|
||||||
numRequests: 5,
|
numRequests: 20,
|
||||||
timeInterval: 5000,
|
timeInterval: 10000,
|
||||||
},
|
},
|
||||||
run({search}){
|
run({search}){
|
||||||
if (!search) return [];
|
if (!search) return [];
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ export default {
|
|||||||
this.ackErrors = null;
|
this.ackErrors = null;
|
||||||
} else if (typeof error === 'string'){
|
} else if (typeof error === 'string'){
|
||||||
this.ackErrors = error;
|
this.ackErrors = error;
|
||||||
} else {
|
} else if (error.reason){
|
||||||
|
this.ackErrors = error.reason;
|
||||||
|
} else {
|
||||||
this.ackErrors = 'Something went wrong'
|
this.ackErrors = 'Something went wrong'
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user