Wrap an error in a MiddlewareError, unless it's a GraphBubbleUp error (like GraphInterrupt) which should propagate unchanged.
wrap(error: unknown, middlewareName: string): Error| Name | Type | Description |
|---|---|---|
error* | unknown | The error to wrap |
middlewareName* | string | The name of the middleware that threw the error |