Relaxed rate limiting on icon search, improved error messaging

This commit is contained in:
Stefan Zermatten
2020-06-22 00:20:40 +02:00
parent cffe0ee574
commit c4dc5895aa
2 changed files with 5 additions and 3 deletions

View File

@@ -71,8 +71,8 @@ const findIcons = new ValidatedMethod({
}).validator(),
mixins: [RateLimiterMixin],
rateLimit: {
numRequests: 5,
timeInterval: 5000,
numRequests: 20,
timeInterval: 10000,
},
run({search}){
if (!search) return [];

View File

@@ -75,7 +75,9 @@ export default {
this.ackErrors = null;
} else if (typeof error === 'string'){
this.ackErrors = error;
} else {
} else if (error.reason){
this.ackErrors = error.reason;
} else {
this.ackErrors = 'Something went wrong'
console.error(error);
}