python-jamf icon indicating copy to clipboard operation
python-jamf copied to clipboard

JamfRecordNotFound class missing attribute

Open bonallure opened this issue 1 year ago • 1 comments

Hello, it looks like the JamfRecordNotFound Error class is missing the attribute response. This causes it to not be properly returned when a record is not found, producing a type error instead.

raise exceptions.JamfRecordNotFound(response, "Not Found")
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: Error.init() takes from 1 to 2 positional arguments but 3 were given

bonallure avatar Jun 12 '24 15:06 bonallure

Hi, I searched for this text and it looks like it's part of the api.py file in _submit_request(), is that right? We have deprecated this file and that's probably why we didn't catch this bug. We aren't actively testing this file. If you're using it, please switch to the much more capable jps-api-wrapper.

magnusviri avatar Jul 01 '24 20:07 magnusviri