Skip to content

Commit 1061709

Browse files
committed
fix: added console.error to all api calls
1 parent ae55d13 commit 1061709

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/app/about/api/delete-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function deleteUser(api: AxiosInstance, userId: string) {
77

88
return { success: true }
99
} catch (error) {
10-
throw new Error('Failed to delete user ' + String(error))
10+
console.error('Failed to delete user ' + String(error))
1111
}
1212

1313
}

src/app/about/api/get-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export async function getUser(api: AxiosInstance, opts: GetUserParams) {
2222

2323
return { user, success: true }
2424
} catch (error) {
25-
throw new Error('Failed to get user ' + String(error))
25+
console.error('Failed to get user ' + String(error))
2626
}
2727
}

src/app/about/api/update-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ export async function updateUser(api: AxiosInstance, data: UpdateUserFormSchema)
2323
return { success: true }
2424

2525
} catch (error) {
26-
throw new Error("Failed to update user " + String(error))
26+
console.error("Failed to update user " + String(error))
2727
}
2828
}

src/app/signin/api/sign-in-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export async function signInUser(api: AxiosInstance, user: SignInFormSchema) {
77
const authenticatedUser = response.data.resource;
88
return authenticatedUser
99
} catch (error) {
10-
throw new Error('Failed to sign in user ' + String(error))
10+
console.error('Failed to sign in user ' + String(error))
1111
}
1212
}

src/app/signin/api/sign-out-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export async function signOutUser(api: AxiosInstance) {
44
try {
55
await api.get("/signout/");
66
} catch (error) {
7-
throw new Error('Failed to sign out user ' + String(error))
7+
console.error('Failed to sign out user ' + String(error))
88
}
99
}

src/app/signup/api/sign-up-user.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ export async function signUpUser(
3333

3434
return { success: true }
3535
} catch (e) {
36-
throw new Error('Failed to sign up user ' + String(e))
36+
console.error('Failed to sign up user ' + String(e))
3737
}
3838
}

0 commit comments

Comments
 (0)