Tomaae
Dabbler
- Joined
- Feb 24, 2021
- Messages
- 12
Hello,
I'm working on TrueNAS integration for Home Assistant and I ran into unusial API behavior.
API will return code 500 not just on server failure, but also when data is not available for existing query.
For example, CPU temperature for TrueNAS running in VM (confirmed on ESX, VirtualBox and Proxmox).
Example query:
There are other cases, but I were not able to pinpoint it, just that some graphs are not showing in TrueNAS as well. It happens for different user.
Both core and scale are reacting in this way.
Is this an intended behaviour for TrueNAS API and if so, can all code 500 error be handles as no-issue from API client side? That is, assuming error 500 would never be raised on actual error.
I'm working on TrueNAS integration for Home Assistant and I ran into unusial API behavior.
API will return code 500 not just on server failure, but also when data is not available for existing query.
For example, CPU temperature for TrueNAS running in VM (confirmed on ESX, VirtualBox and Proxmox).
Example query:
Code:
query: reporting/get_data, post, {'graphs': [{'name': 'cputemp'}], 'reporting_query': {'start': 'now-90s', 'end': 'now-30s', 'aggregate': True}}
There are other cases, but I were not able to pinpoint it, just that some graphs are not showing in TrueNAS as well. It happens for different user.
Both core and scale are reacting in this way.
Is this an intended behaviour for TrueNAS API and if so, can all code 500 error be handles as no-issue from API client side? That is, assuming error 500 would never be raised on actual error.