How can I deal with error on Rest Connector

Hello,

There is as process, using Rest Connector, that return an ERROR - 400 BAD REQUEST.
When this happens, flow stucks.

There is a error expression dealing with error.

if error.code = "400" then
  bpmnError("400", "Client Reproved")
else if error.code = "bpmn-error" then
  bpmnError("400", "Client Reproved")
else
  null

And on Error Boundary Event, it’s expecting 400.

What is wrong?