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

def raise_error(self, status=500, message="Generic server error.  Out of luck..."):
        """
        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})