Per-partition rate limiting added a new error type which should be returned when Scylla decides to reject an operation due to per-partition rate limit being exceeded. The new error code requires drivers to negotiate support for it, otherwise Scylla will report the error as `Config_error`. The existing error code override logic works properly, however due to a mistake Scylla will report the `Config_error` code even if the driver correctly negotiated support for it. This commit fixes the problem by specifying the correct error code in `rate_limit_exception`'s constructor. Tested manually with a modified version of the Rust driver which negotiates support for the new error. Additionally, tested what happens when the driver doesn't negotiate support (Scylla properly falls back to `Config_error`). Branches: 5.1 Fixes: #11517 Closes #11518
4.9 KiB
4.9 KiB