結果 : how to handle error in javascript