Skip to content

Commit 8d8a292

Browse files
committed
Forward constructor options from ServerlessError to Error
Passing the options object through to the native Error constructor makes ServerlessError support the standard { cause } option, so wrappers can preserve the underlying error alongside a user-facing message. Claude-Session: https://claude.ai/code/session_01XjKyVVZTqg7EmwqRgGtjwc
1 parent a6ff801 commit 8d8a292

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/serverless-error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class ServerlessError extends Error {
44
constructor(message, code, options = {}) {
5-
super(message);
5+
super(message, options);
66
this.code = code;
77
this.decoratedMessage = options.decoratedMessage;
88
}

0 commit comments

Comments
 (0)