Citizen.Await error display issue

    print("before")
    local p = promise.new()
    SetTimeout(100, function() p:resolve() end)
    Citizen.Await(p)
    print("after")
    error("test") -- not displayed
    print("after error") -- not displayed

When using Citizen.Await in a coroutine, following errors in the coroutine are not displayed.

This is a very bothering issue that makes debugging a nightmare (silent errors), it’s likely located in citizen/scripting/lua/deferred.lua at the pcall calls (error handling).

To at least display the errors, I added if not ok then print(err) end before line 51 of citizen/scripting/lua/deferred.lua (based on last windows server build).

Edit: actually I also added the error print at two other places like local ok, v = pcall..., all errors were not displayed