Is there any way to catch the error here, like below?