code: def factory(resp):
          
          status = resp['status']
          if status == 401:
              return UnauthorizedError(resp)
          elif status == 404:
              return NotFoundError(resp)
          elif status == 422:
              return UnprocessableEntityError(resp)
          else:
              # generic fallback
              return ResponseError(resp)
docs: Return a ResponseError subclass based on the API payload.
  
          All errors are documented: https://docs.mollie.com/guides/handling-errors#all-possible-status-codes
          More exceptions should be added here when appropriate, and when useful examples of API errors are available.