remix-auth-github
Version:
A strategy to implement login with GitHub in Remix Auth.
15 lines • 344 B
JavaScript
function isResponse(value) {
return value instanceof Response;
}
export async function catchResponse(promise) {
try {
await promise;
throw new Error("Should have failed.");
}
catch (error) {
if (isResponse(error))
return error;
throw error;
}
}
//# sourceMappingURL=helpers.js.map