Commit 41091ebb authored by Libin Lu's avatar Libin Lu

fix error log

parent eea5f04a
...@@ -83,11 +83,15 @@ class FirebaseClient { ...@@ -83,11 +83,15 @@ class FirebaseClient {
try { try {
let response = await fetch(API_URL, { method: "POST", headers, body }); let response = await fetch(API_URL, { method: "POST", headers, body });
console.log(response);
try{
response = await response.json(); response = await response.json();
if(!response.success){ if(!response.success){
Alert.alert('Failed to send notification, check error log') Alert.alert('Failed to send notification, check error log')
} }
console.log(response); } catch (err){
Alert.alert('Failed to send notification, check error log')
}
} catch (err) { } catch (err) {
Alert.alert(err && err.message) Alert.alert(err && err.message)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment