結果 : javascript check if error is type