Skip to content

Support cause in Error constructor  #112

@erfanium

Description

@erfanium

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

it would be great to be able to use cause option in fastify errors as well

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause

Motivation

No response

Example

const jsError = new Error("hey", { cause: new Error("cause") }) // supported by js
const fError = new FASTIFY_ERROR("hey", { cause: new Error("cause") }); // not supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions