const catchable = (promise) => {
    return promise.then(data => ({ result: data, error: undefined }))
        .catch((err) => ({ result: {}, error: err }));
};
export default catchable;
//# sourceMappingURL=promise-error-handler.js.map