API return 500 when data on TrueNAS side are unavailable

Description

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:

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.

Problem/Justification

None

Impact

None

Activity

Show:

Bug Clerk 
March 27, 2025 at 6:59 AM

This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Bug Clerk 
March 27, 2025 at 6:59 AM

As we have not received any additional information on this issue, we are closing this ticket. If you still experience this issue on the latest release, please add those details to a new ticket so that we can continue our investigation. Thank you!

Not Applicable

Details

Assignee

Reporter

Labels

Impact

Components

Fix versions

Priority

More fields

Katalon Platform

Created April 12, 2022 at 3:27 PM
Updated March 27, 2025 at 6:59 AM
Resolved March 27, 2025 at 6:59 AM