Fix error response status codes for post attachments