-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stacktrace enhancement for errors in pipes (#2317)
## What does this PR do ? Work had been done on stacktrace a while ago to enhance them so developers can distinguish there code from Kuzzle one. (See #1944) Few problems remains: - `hilightUserCode` was called many times on the same stack - errors thrown by the SDK in a pipe did not include the line with the code that triggered the error This fix cover the following additional use cases: ``` app.pipe.register('server:afterNow', async req => { await app.sdk.collection.list('do-not-exist'); }); app.pipe.register('server:afterInfo', async req => { throw new BadRequestError('afterInfo'); }); app.pipe.register('server:afterGetStats', async function afterGetStats (req) { await app.sdk.collection.list('do-not-exist'); }); app.pipe.register('server:afterMetrics', async function afterMetrics (req) { throw new BadRequestError('afterMetrics'); }); ``` ### Other changes - remove useless await in FunnelProtocol + convert to Typescript - extract `removeErrorStack` into `util` directory
- Loading branch information
Adrien Maret
authored
Apr 11, 2022
1 parent
7a53414
commit 4ce6c97
Showing
15 changed files
with
204 additions
and
133 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Oops, something went wrong.