Welcome to the Linux Foundation Forum!

Labs (ch-7 / labs-1) serverError validate

Server error validation when the branded service is inactive:
The req.setTimeout (1500) on line 27 (validate.js) delays a short time for the response with statusCode 500.
And validation fails because the server does not respond in time.

Tnx

Comments

  • aalthawraalthawr Posts: 1
    edited May 31

    You can do something like this


    SPOILERS! ->
    const boat = await got(`${boatSrv}/${id}`, {timeout: 600, retry:0}).json()
    const brand = await got(`${brandSrv}/${boat.brand}`, {timeout: 600, retry:0}).json()
    

  • cool, great solution.
    thank you so much @aalthawr !!

  • @aalthawr thanks for this! I've wrapped your comment in a

    element to avoid spoilers
Sign In or Register to comment.