def to_model(self):
e = ApiPool().current_server_api.model.Error(<EOL>status=self.status,<EOL>error=self.code.upper(),<EOL>error_description=str(self),<EOL>)<EOL>if self.error_id:<EOL><INDENT>e.error_id = self.error_id<EOL><DEDENT>if self.user_message:<EOL><INDENT>e.user_message = self.user_message<EOL><DEDENT>if self.error_caught:<EOL><INDENT>e.error_caught = pformat(self.error_caught)<EOL><DEDENT>return e<EOL>
Return a bravado-core Error instance