• guybe7's avatar
    Align RM_ReplyWithErrorFormat with RM_ReplyWithError (#12321) · 20fa1560
    guybe7 authored
    Introduced by https://github.com/redis/redis/pull/11923 (Redis 7.2 RC2)
    
    It's very weird and counterintuitive that `RM_ReplyWithError` requires the error-code
    **without** a hyphen while `RM_ReplyWithErrorFormat` requires either the error-code
    **with** a hyphen or no error-code at all
    ```
    RedisModule_ReplyWithError(ctx, "BLA bla bla");
    ```
    vs.
    ```
    RedisModule_ReplyWithErrorFormat(ctx, "-BLA %s", "bla bla");
    ```
    
    This commit aligns RM_ReplyWithErrorFormat to behvae like RM_ReplyWithError.
    it's a breaking changes but it's done before 7.2 goes GA.
    20fa1560
module.c 559 KB