Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/domain_functions/src/errors.ts>ResultError

Types and functions to make composition easy and safe
Latest
class ResultError
extends Error
import { ResultError } from "https://deno.land/x/domain_functions@v3.0.0/src/errors.ts";

A custom error class for creating ErrorResult.

Examples

const df = mdf()(() => { throw new ResultError({ errors: [{ message: 'Some error' }], inputErrors: [{ message: 'Some input error', path: 'user.name' }], }) })

Constructors

new
ResultError(result: AtLeastOne<ErrorData>)