I have been noticing that sometimes when I am quer...
# gooddata-ui
I have been noticing that sometimes when I am querying the backend to get the dateDatasets for a particular workspace, that I get a null response.
Copy code
const dateDatasets = await backend.workspace(workspace).catalog().forTypes(["dateDataset"]).load()
Is this to be expected? Could very well be an issue with the nature of async calls, but wanted to see if this was normal
Hi Justin, it could be related to when you are making the call and when a data loading process is running. What steps are taken when seeing the null response? Is there any difference from when you receive the null response and when you do not?
So first we make an async call to our own backend to get the right auth token for the dashboard then we set the TigerBackend with that token like so
Copy code
const tigerBackend = tigerFactory().onHostname(process.env.GDAPI_HOST).withAuthentication(new TigerTokenAuthProvider(data.token));
then we make the call to the catalog to get the dateDatasets. I would say 90% of the time this works just fine but every once in a while we get returned a null value from this call.
Hi Justin, so let me recap this: your call works most of the time, but sometimes the
variable is null? Can you please shware some more of your code? Becasue I double checked the implementation of the load method on tiger and I see no way it could return null 😕