Skip to content

Commit

Permalink
log log response
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Mar 27, 2024
1 parent 55753ab commit d68952f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/log.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const log = async ({ env, user_id, tags }) => {
await fetch('https://api.logsnag.com/v1/log', {
const response = await fetch('https://api.logsnag.com/v1/log', {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${env.LOGSNAG_API_TOKEN}`,
Expand All @@ -14,4 +14,7 @@ export const log = async ({ env, user_id, tags }) => {
}),
method: 'POST',
});
const data = await response.json();

Check failure on line 17 in src/log.js

View workflow job for this annotation

GitHub Actions / test (20.x)

src/mail.test.js > mail > makes a request to the sendgrid api

TypeError: Cannot read properties of undefined (reading 'json') ❯ Module.log src/log.js:17:31 ❯ Module.mail src/mail.js:36:3 ❯ src/mail.test.js:35:5

Check failure on line 17 in src/log.js

View workflow job for this annotation

GitHub Actions / test (20.x)

src/mail.test.js > mail > logs

TypeError: Cannot read properties of undefined (reading 'json') ❯ Module.log src/log.js:17:31 ❯ Module.mail src/mail.js:36:3 ❯ src/mail.test.js:50:5
// eslint-disable-next-line no-console
console.log(data);
};

0 comments on commit d68952f

Please sign in to comment.