This change sets the 'Retry-After' response header when throwing the 429 error (i.e. the throw option is set to true). Previously this was not the case because Koa's default error handler unsets all response headers before setting those specified in the error object.
I had to change the error handling in the tests because catching and handling the error bypassed Koa's error handler.
Please let me know if you have questions or suggestions
This change sets the 'Retry-After' response header when throwing the 429 error (i.e. the
throw
option is set totrue
). Previously this was not the case because Koa's default error handler unsets all response headers before setting those specified in the error object.I had to change the error handling in the tests because catching and handling the error bypassed Koa's error handler.
Please let me know if you have questions or suggestions