Skip to content

Commit

Permalink
fix: log and return null on 404
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Nov 21, 2024
1 parent cf927aa commit 0a9265b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connectors/src/connectors/zendesk/lib/zendesk_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ async function fetchFromZendeskWithRetries({
if (error.code === "unauthorized") {
throw new ExternalOAuthTokenError();
}
if (error.code === "not_found") {
if (error.code === "not_found" || rawResponse.status === 404) {
logger.error({ rawResponse, error }, "[Zendesk] Zendesk API error");
return null;
}
}
Expand Down

0 comments on commit 0a9265b

Please sign in to comment.