Created
December 8, 2022 07:46
-
-
Save LuckyArdhika/8f8f4600367e71d8e841d765d7d6628a to your computer and use it in GitHub Desktop.
Revisions
-
LuckyArdhika created this gist
Dec 8, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ try { // block code of try console.log("[+] Return: ", result); return result; } catch (err) { console.log({ type: "Error Logger", data: { Path: req.path, Method: req.method, ErrorStack: err, ErrorMessage: err.message, ErorStatus: err.status, RequestBody: req.body || request.body || body }); // return or other code block } finaly { // block code of finally }