use uv_last_err to convert error codes to exceptions