return error as in oauth flow