Added exception handling for 400 errors. Added error checking for nargs.