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
After updating the programming model from ^3.0.0 to ^4.6.0 and the runtime from 3.* to 4.* some functions that has try/catch and early return stop and return timeout.
asyncfunctionemailValidator(req: HttpRequest): Promise<HttpResponseInit>{// ...try{constemail_and_domain=email.split('@')if(email_and_domain.length<2||!isValidEmail(email)){throw{message: `O Email ${email} inválido`,status: 400,type: InvalidEmailType.INVALID,}}constemail_name=email_and_domain[0]constemail_domain=email_and_domain[1]constdomainAllowedList=awaitDomainAllowedListModel.findOne({domain: email_domain,})if(domainAllowedList){response.status=200response.jsonBody={isValid: true,message: `O email ${email} é válido. Está na Lista de Autorizações`,
email,}return}// code continues...}catch(err){conststatus=err?.status||500constmessage=err?.messageresponse.status=statusresponse.jsonBody={ message, status, ...err}}returnresponse}
The throw works good, also when !domainAllowedList the functions works properly, but when get into the return inside the if, the function stops and gives timeout after a couple minutes.
The text was updated successfully, but these errors were encountered:
After updating the programming model from
^3.0.0
to^4.6.0
and the runtime from3.*
to4.*
some functions that has try/catch and early return stop and return timeout.The throw works good, also when
!domainAllowedList
the functions works properly, but when get into the return inside the if, the function stops and gives timeout after a couple minutes.The text was updated successfully, but these errors were encountered: