UniversalDevicesInc-PG3 / udi-poly-notification

Polyglot v2 NodeServer for Notifications
MIT License
2 stars 1 forks source link

REST Interface Call Fails when priority param is specified #18

Closed rk25862 closed 3 years ago

rk25862 commented 3 years ago

When Network Resource call to the REST interface is made that includes the priority variable/parameter, the call fails with an error: "TCP client request failed [Net Module Rule 24:500]". A screenshot of the error is attached.

When the priority parameter is removed, the request succeeds.

Example Fail /send?node=po_pushown&Subject=My+Subject&priority=2 Example Success /send?node=po_pushown&Subject=My+Subject

Corresponding Log from NodeServer 2020-11-21 04:15:00,390 Thread-1 polyinterface ERROR PolyglotREST:l_error: get_handler: failed Traceback (most recent call last): File "/root/.polyglot/nodeservers/Notification/PolyglotREST.py", line 253, in get_handler ret = self.ghandler(command,params,post_data) File "/root/.polyglot/nodeservers/Notification/nodes/Controller.py", line 620, in rest_ghandler return self.nodes[node].rest_send(data) File "/root/.polyglot/nodeservers/Notification/nodes/Pushover.py", line 397, in rest_send return self.do_send(params) File "/root/.polyglot/nodeservers/Notification/nodes/Pushover.py", line 349, in do_send params['priority'] = self.get_pushover_priority(params['priority']) File "/root/.polyglot/nodeservers/Notification/nodes/Pushover.py", line 303, in get_pushover_priority return val - 2 TypeError: unsupported operand type(s) for -: 'str' and 'int' 2020-11-21 04:15:00,390 Thread-1 polyinterface ERROR PolyglotREST:l_error: get_handler: code=500 message=ghandler failed, see log

Screenshot of Error from Network Resource 2020-11-20_22-24-34

jimboca commented 3 years ago

Sorry I missed this report, I'll take a look when possible...

jimboca commented 3 years ago

Fixed in 0.1.17