diff --git a/.changeset/purple-icons-protect.md b/.changeset/purple-icons-protect.md new file mode 100644 index 00000000..709f0d77 --- /dev/null +++ b/.changeset/purple-icons-protect.md @@ -0,0 +1,5 @@ +--- +'@nestjs/throttler': minor +--- + +Add dynamic error messages based on context and ThrottlerLimitDetail diff --git a/README.md b/README.md index 533f84f0..c2e255c3 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ If you need to set up storages instead, or want to use a some of the above optio errorMessage - a string which overrides the default throttler error message + a string OR a function that takes in the ExecutionContext and the ThrottlerLimitDetail and returns a string which overrides the default throttler error message getTracker