"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const catchable = (promise) => {
    return promise.then(data => ({ result: data, error: undefined }))
        .catch((err) => ({ result: {}, error: err }));
};
exports.default = catchable;
//# sourceMappingURL=promise-error-handler.js.map