indutny / indutny/node-nat-upnp
If (err) return callback(null)
- Dominant language
- JavaScript
- Stars
- 148
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
This module worked fine a couple of days ago, but now it does not show me the mappings (but I can assign private => public ports) so I debugged a bit. Turns out that at the following line the callback does not include the error:
https://github.com/indutny/node-nat-upnp/blob/master/lib/nat-upnp/client.js#L89-L92
Shouldn't it return the error?
Anyway in my case the request body is the following:
``` js
{ '@':
{ 'xmlns:SOAP-ENV': 'http://schemas.xmlsoap.org/soap/envelope/',
'SOAP-ENV:encodingStyle': 'http://schemas.xmlsoap.org/soap/encoding/' },
'SOAP-ENV:Body':
{ 'SOAP-ENV:Fault':
{ faultcode: 'SOAP-ENV:Client',
faultstring: 'UPnPError',
detail:
{ UPnPError:
{ '@': { xmlns: 'urn:schemas-upnp-org:control-1-0' },
errorCode: '402',
errorDescription: 'Invalid NewPortMappingIndex' } } } } }
```
Any thoughts?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at lib/nat-upnp/client.js lines 89-92 and inspect how the callback handles the SOAP response shown in the issue. Reproduce or trace the failed port-mapping lookup, then verify that the callback preserves the reported error and that successful private-to-public mappings still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100