(requestBody, callback)
| 9 | const cache = require('./apiUtils/rateLimit/cache'); |
| 10 | |
| 11 | function parseRequestBody(requestBody, callback) { |
| 12 | try { |
| 13 | const jsonData = JSON.parse(requestBody); |
| 14 | callback(null, jsonData); |
| 15 | } catch { |
| 16 | callback(errorInstances.InvalidArgument); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | function validateRateLimitConfig(requestConfig, callback) { |
| 21 | const limit = requestConfig.RequestsPerSecond; |
no outgoing calls
no test coverage detected