coronasafe / teleicu_middleware

Middleware to help tunnel CCTV Streams and ONVIF APIs for TeleICU.
MIT License
3 stars 14 forks source link

Middleware Incorrectly Marks Assets as Down Due to Misconfiguration #98

Closed Ashesh3 closed 10 months ago

Ashesh3 commented 10 months ago

Description

We have identified an issue where the middleware marks an asset as 'down' if any camera asset under the same middleware is misconfigured. These issues are causing problems with asset uptime tracking and have resulted in the Dev Camera being incorrectly shown as down. Furthermore, if the local IP of the camera is invalid, the server times out and never responds.

Steps to Reproduce

  1. Misconfigure a camera asset under the same middleware by leaving the username or the password field blank, or by using an invalid local IP.
  2. Check the status of other assets under the same middleware, along with the misconfigured one.

Expected Behavior

The middleware should return the status of each asset independently. If a camera is misconfigured or has an invalid local IP, it should not impact the status of other assets under the same middleware. The expected statuses should be:

  1. Up
  2. Down

Actual Behavior

The middleware returns a 400 Bad Request when any of the camera assets under the same middleware is misconfigured or has an invalid local IP. It does not return the status for the other cameras which are correctly configured, marking them as 'down'. Additionally, the server times out and does not respond when the local IP of the camera is invalid.