結果 : javascript check for error type