You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{UserModel}from'mongoose/models';asyncfunctiongetUserFullName(ctx){constuser=awaitUserModel.findById(ctx.req.userId);console.log(user);// The user is properly retrievedctx.res={fullName: `${user.firstName}${user.lastName}`};}
Very simple so far, but upon calling it with a client generated with grpc-caller I get this error:
Hello,
I have an issue with empty response to clients when using
await
withinasync functions
.Here is my proto:
I have this handler:
Very simple so far, but upon calling it with a client generated with
grpc-caller
I get this error:But, when I change my hander to the following:
It works fine, but I'm not sure why. Is it due to the UNARY nature of the call?
The text was updated successfully, but these errors were encountered: