refactor show error to give more flexibility (like showing retry button)