In my application I\'ve defined a simple wrapper function called fail, which simply looks like this:
fail
export function fail(err: Error): never {