Fix incorrect status code (#1638)