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
Describe the bug
fetchTimebounds will return invalid data if current datetime is broken on the local machine.
The problem depends of your axios middleware. HorizonAxiosClient.interceptors.response.use in the library horizon_axios_client.js
Javascript will convert all object properties in lowercase.
property Date of response.headers.Date is undefined!
Please update your module and make is response.headers.date.
Ho to reproduce:
Change your local time -1 hour. Don't change timezone!
We are currently facing the same issue in our project.
Unfortunately changing the expression in HorizonAxiosClient.interceptors.response.use(...) from response.headers.Date to response.headers.date will not solve the problem, because the date header is not present in the headers object supplied by the axios client.
As pointed out here browsers cannot access the date header by default which probably is the reason why the intercepted response from the axios client does not have a response.headers.date property set.
So I guess the solution would be to make the horizon add a Access-Control-Expose-Headers: date header to responses?
Describe the bug
fetchTimebounds will return invalid data if current datetime is broken on the local machine.
The problem depends of your axios middleware.
HorizonAxiosClient.interceptors.response.use
in the library horizon_axios_client.jsJavascript will convert all object properties in lowercase.

property Date of response.headers.Date is undefined!
Please update your module and make is response.headers.date.
Ho to reproduce:
The text was updated successfully, but these errors were encountered: