fixe error handling for popup

Signed-off-by: thyb <thyb@oauth.io>