<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 """ Sets an error status and returns a message to the user in JSON format :param int status: The status code to use :param str message: The message to return in the JSON response """

        self.set_status(status)
        self.write({"message" : message,
                    "status" : status})