def map(cls, status_code):
        if status_code == '502':
            return cls.OK
        elif status_code == '504':
            return cls.PROCESSING
        else:
            raise UnknownStatusError(
                'Received unsupported status in response: %s' % status_code
            )