Update to all catch functions.
This commit is contained in:
@@ -117,7 +117,7 @@ export let delete_object = async function delete_object(
|
||||
// console.log(response.data);
|
||||
// return response.data;
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// .catch(function (error: any) {
|
||||
// if (error.response && error.response.status === 404) {
|
||||
// return null; // Returning null since there were no results
|
||||
// }
|
||||
|
||||
@@ -163,7 +163,7 @@ export async function get_ae_obj_id_crud(
|
||||
timeout: timeout,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch(function (error: any) {
|
||||
console.log('API GET CRUD object ID request failed.', error);
|
||||
});
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ export let get_object = async function get_object(
|
||||
return return_data;
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch(function (error: any) {
|
||||
// Handle the common and expected 404 "error" first
|
||||
if (error.response && error.response.status === 404) {
|
||||
if (log_lvl) {
|
||||
@@ -392,7 +392,7 @@ export let get_object = async function get_object(
|
||||
return response;
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch(function (error: any) {
|
||||
// Handle the common and expected 404 "error" first
|
||||
if (error.response && error.response.status === 404) {
|
||||
if (log_lvl) {
|
||||
|
||||
@@ -266,7 +266,7 @@ export let post_object = async function post_object(
|
||||
// }
|
||||
// //return response.data;
|
||||
// })
|
||||
// .catch(function (error) {
|
||||
// .catch(function (error: any) {
|
||||
// if (error.response && error.response.status === 404) {
|
||||
// return null; // Returning null since there were no results
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user