Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, isThenable } from '@sentry/core';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe isThenable is not used.

also thank you for this simplification - I've missed the fact that _wrapEventFunction calls callback and no extra Promise waiting needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I just add a commit to fix biome warning? not sure about squashing at this point though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we squash all of our prs - don't worry about clean commit history

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok - thanks for clarification. pushed a fix


import type { Event } from '@sentry/core';
import { wrapEventFunction } from '../../src/gcpfunction/events';
Expand Down Expand Up @@ -49,15 +49,13 @@ describe('wrapEventFunction', () => {
resource: 'some.resource',
};

const result = fn({}, context, (err: any, result: any) => {
fn({}, context, (err: any, result: any) => {
if (err != null || err != undefined) {
reject(err);
} else {
resolve(result);
}
});

Promise.allSettled([result]).catch(error => reject(error));
});
}

Expand Down
Loading