Skip to content

Commit 72d8e09

Browse files
Clean up error catching/throwing
1 parent 786282e commit 72d8e09

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

e2e/react-native-otel/app/(tabs)/index.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -466,25 +466,14 @@ export default function HomeScreen() {
466466

467467
const handleAxiosSuccess = async () => {
468468
await axios.get('https://jsonplaceholder.typicode.com/posts/1')
469-
Alert.alert('Axios Request', `Request completed`)
470469
}
471470

472471
const handleAxios404 = async () => {
473-
try {
474-
await axios.get('https://jsonplaceholder.typicode.com/posts/99999')
475-
} catch (error) {
476-
Alert.alert('Axios 404', `Request completed`)
477-
throw error
478-
}
472+
await axios.get('https://jsonplaceholder.typicode.com/posts/99999')
479473
}
480474

481475
const handleAxios500 = async () => {
482-
try {
483-
await axios.get('https://httpstatuses.maor.io/500')
484-
} catch (error) {
485-
Alert.alert('Axios 500', `Request completed`)
486-
throw error
487-
}
476+
await axios.get('https://httpstatuses.maor.io/500')
488477
}
489478

490479
return (

0 commit comments

Comments
 (0)