Closed erangden closed 9 years ago
Cool. I'll take a look at the PR. Must be a new protocol enhancement. Typically you need to throw an Exception from do_transform in order for it to show an exception. I had no idea they started adding the 600 code.
On Tuesday, 20 October 2015, erangden notifications@github.com wrote:
I couldn't figure out a way to make plume return a 600 coded maltego exception as mentioned in http://dev.paterva.com/developer/advanced/transform_hub.php. I tried to use croak for this, but unsuccessfully. The following changes should allow
you to customize a return exception in the transform.
You can view, comment on, or merge this pull request online at:
https://github.com/allfro/canari/pull/54 Commit Summary
- allow custom maltegoExceptions from plume
- allow error code attribute on maltegoException
File Changes
- M src/canari/maltego/message.py https://github.com/allfro/canari/pull/54/files#diff-0 (5)
- M src/canari/tds/plume.py https://github.com/allfro/canari/pull/54/files#diff-1 (6)
Patch Links:
— Reply to this email directly or view it on GitHub https://github.com/allfro/canari/pull/54.
So the error code addition to the xml object is fine but the other commit
is unnecessary. You can raise an exception by doing raise MaltegoException("your msg", code=600)
On Tuesday, 20 October 2015, erangden notifications@github.com wrote:
I couldn't figure out a way to make plume return a 600 coded maltego exception as mentioned in http://dev.paterva.com/developer/advanced/transform_hub.php. I tried to use croak for this, but unsuccessfully. The following changes should allow
you to customize a return exception in the transform.
You can view, comment on, or merge this pull request online at:
https://github.com/allfro/canari/pull/54 Commit Summary
- allow custom maltegoExceptions from plume
- allow error code attribute on maltegoException
File Changes
- M src/canari/maltego/message.py https://github.com/allfro/canari/pull/54/files#diff-0 (5)
- M src/canari/tds/plume.py https://github.com/allfro/canari/pull/54/files#diff-1 (6)
Patch Links:
— Reply to this email directly or view it on GitHub https://github.com/allfro/canari/pull/54.
Thanks for the info. I'll change the commit and force push.
New commit. Mergeable like that?
I couldn't figure out a way to make plume return a 600 coded maltego exception as mentioned in http://dev.paterva.com/developer/advanced/transform_hub.php. I tried to use croak for this, but unsuccessfully. The following changes should allow you to customize a return exception in the transform.