Skip to content

Commit

Permalink
add to e message replace
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Oct 7, 2024
1 parent c840642 commit 044f417
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/core/server/app/handlers/api/tenor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export const tenorSearchHandler =
next: json.next,
});
} catch (e) {
// Ensure that the API key doesn't get leaked to the logs by accident.
if (e.message) {
e.message = e.message.replace(tenant.media?.gifs.key, "[Sensitive]");
}
throw new WrappedInternalError(e as Error, "tenor search error");
}
};

0 comments on commit 044f417

Please sign in to comment.