Hi everyone, Im trying to use wiremock standalone ...
# help
p
Hi everyone, Im trying to use wiremock standalone with handlebars and i got this error can someone help me look into this? my handlebar file
Copy code
{ {{#if {{jsonPath request.body '$.immediatereject'}}}}
        "immediatereject":{{jsonPath request.body '$.client'}},
    {{else}}
        "secret":"secret",
    {{/if}}
    "client":{{jsonPath request.body '$.client'}},
    "status":200,
}
error:
Copy code
Error 500
      wiremock.com.google.common.util.concurrent.UncheckedExecutionException:
      wiremock.com.github.jknack.handlebars.HandlebarsException:
      inline@107c9fbe:2:11: found: '{'
      {{#if {{jsonPath request.body '$.immediatereject'}}}}
      ^
t
Hi @Papop Lekhapanyaporn the issue is the syntax for nested helper calls. You need ( rather than { for inner calls:
Copy code
{{#if (jsonPath request.body '$.immediatereject')}}
p
Tysm 🙂. the problem is resolved now!
👍 1