Replace exception field name to be more pythonic
Change rest api to raise an exception instead of sys.exit
Add rest._method tests