I finally found the problem: I needed to return the status (not statusCode) as a string instead of a number.