koajs / ratelimit

Rate limiter middleware
MIT License
485 stars 57 forks source link

Add custom error support. #23

Closed pongib closed 8 years ago

pongib commented 8 years ago

I just see other PR with this custom error but not merge yet. So I decide to write my own custom error without remove any dependency and reserved error type as string not object like before PR. Because I want to use this error message with throw option and should be simple as possible.

If I do something wrong just clarify me. Thank you for your great work.

haoxins commented 8 years ago

cc @dead-horse

pre PR: https://github.com/koajs/ratelimit/pull/12

pongib commented 8 years ago

I just change errMessage to errorMessage that @coderhaoxin suggest and add docs for it.

haoxins commented 8 years ago

land 4e38fb16c45c5bcc0782fc847471b18eaf35c502

haoxins commented 8 years ago

v2.4.0 published