Skip to content

Provide a method to get GraphQLError as Js.Exn.t #257

@Kingdutch

Description

@Kingdutch

Since the GraphQLError extends JavaScripts Error class anywhere that we can use a JavaScript error (typed in ReScript as Js.Exn.t) we can also use a GraphQLError.

Error reporting code that accepts a Js.Exn.t can't directly accept a GraphQLError. Adding an asJsExn method to GraphQLError.res could simplify code that deals with errors :) external asJsExn : t => Js.Exn.t = "%identity" should probably do the trick :D (this only holds from GraphQLError -> Error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions