-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I am using typescript and I am seeing the errorHandler as required, but I think it should be optional:
app.use(
authMiddleWare.authn(admin.auth(), {
attachUserTo: "token",
errorHandler: () => {
functions.logger.log("INVALID AUTHENTICATION");
},
})
);
So if I want to pass in attachUserTo I must pass in errorHandler as well.
Furthermore I don't really get, how it can be used. In the source code, I see:
if (errorHandler) {
// Set status onto object too so that user's error handler can have access to it
resObj.status = status;
errorHandler(resObj);
}
resObj seems to be not defined and I think the request and response should be passed as parameters as well to implement something useful with it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels