Force an error upon webform submission

Options

This help article states that we can configure webform URLs to redirect to different pages upon success or error.

ref-success={{url1}}
ref-error={{url2}}

In my experience, webform submissions always lead to a success. How can I force an error so that we redirect to url2 in certain cases?

Answers