Skip to content

Commit

Permalink
track error if branch request fails
Browse files Browse the repository at this point in the history
  • Loading branch information
latter-bolden committed Oct 7, 2024
1 parent 4b3815a commit 25b960e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/shared/src/logic/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export const getDeepLink = async (
params.set('branch_key', branchKey);
const response = await fetchBranchApi(`/v1/url?${params}`);
if (!response.ok) {
const badRequestInfo = await response.json();
logger.trackError('branch request failed', {
responseStatus: response.status,
responseJson: badRequestInfo,
});
return undefined;
}
const {
Expand All @@ -37,6 +42,11 @@ export const getBranchLinkMeta = async (
params.set('branch_key', branchKey);
const response = await fetchBranchApi(`/v1/url?${params}`);
if (!response.ok) {
const badRequestInfo = await response.json();
logger.trackError('branch request failed', {
responseStatus: response.status,
responseJson: badRequestInfo,
});
return undefined;
}

Expand Down

0 comments on commit 25b960e

Please sign in to comment.