Skip to content

Commit

Permalink
added logger (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro100 authored Aug 12, 2024
1 parent c773e5d commit 036bad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/packages/feed-form/src/impl/feed-form-impl.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {GoogleSpreadsheet} from "google-spreadsheet";
import {GoogleAuth} from "google-auth-library";
import {Response, Request} from "firebase-functions/v1";
import * as logger from "firebase-functions/logger";

export interface FeedSubmissionFormRequestBody {
name: string;
Expand Down Expand Up @@ -53,7 +54,7 @@ export const writeToSheet = async (request: Request, response: Response) => {

response.status(200).send("Data written to the new sheet successfully!");
} catch (error) {
console.error("Error writing to sheet:", error);
logger.error("Error writing to sheet:", error);
response.status(500).send("An error occurred while writing to the sheet.");
}
};
Expand Down

0 comments on commit 036bad2

Please sign in to comment.