if [200, 201].include?(response.status)
      render plain: ez_response(response.body, profile: @profile).to_anvl, status: :ok
    elsif [401, 403].include?(response.status)
      response.headers.delete_if { |key| key == 'X-Credential-Username' }
      render plain: "error: unauthorized", status: :unauthorized