telefonicaid / iotagent-manager

IoT Agent Manager to use as proxy for multiple IoTAgents with different protocols
GNU Affero General Public License v3.0
7 stars 8 forks source link

return valid results when several status codes #251

Open AlvaroVega opened 3 years ago

AlvaroVega commented 3 years ago

When iotaRedirector retrieves several status codes from iotagents linke [200,200,400] then iotagentManager is responding with 400 error.

This PR tries to return the valid results retrieved by iotagent-manager instead just one error.

Related issue https://github.com/telefonicaid/iotagent-manager/issues/167

This PR overcomes https://github.com/telefonicaid/iotagent-manager/pull/249

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1261150107

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/services/iotaRedirector.js 10 23 43.48%
<!-- Total: 10 23 43.48% -->
Files with Coverage Reduction New Missed Lines %
lib/services/iotaRedirector.js 14 74.93%
<!-- Total: 14 -->
Totals Coverage Status
Change from base Build 949284276: -1.3%
Covered Lines: 506
Relevant Lines: 632

💛 - Coveralls
AlvaroVega commented 3 years ago
AlvaroVega commented 3 years ago

Depends on this PR https://github.com/telefonicaid/iotagent-manager/pull/256 This PR should be merged after PR https://github.com/telefonicaid/iotagent-manager/pull/256

AlvaroVega commented 3 years ago

time=2021-09-22T15:48:20.727Z | lvl=WARN | corr=eeed4c39-33d8-440a-8d52-8922230167f9 | trans=eeed4c39-33d8-440a-8d52-8922230167f9 | op=IoTAManager.Redirector | from=n/a | srv=smartcity | subsrv=/problemas/masproblemas | msg=several statusCodes [200,400] and combinedResults {"count":0,"devices":[]}, redirecting for GET | comp=IoTAgentManager