This will provide a more verbose error if/when an API error occurs to make it more clear what caused the error
Additional verbosity could be included after more samples are collected and analyzed
(Reverted in ef2ddedabeaae2fcb9b1da81131aacd53c12ba3b) ~Raise a ProcessorError if a unaccounted for status_code is received~
Example for a 409 error:
JamfPolicyUploader: Checking for existing 'Microsoft Office' on https://jps.org:8443
JamfPolicyUploader: Checking for existing authentication token
JamfPolicyUploader: Checking https://jps.org:8443 against https://jps.org:8443
JamfPolicyUploader: URL or user do not match current token request
JamfPolicyUploader: No existing valid token found
JamfPolicyUploader: Getting an authentication token
JamfPolicyUploader: Session token received
JamfPolicyUploader: Token: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiYTYzMjA1NWYtZjEzYy00NWMzLTk4NzctNDE4YTIwNDg5M2NkIiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiI0OCIsImV4cCI6MTY2NjUwMTM5MH0.3ius0pAp53tEfULLr2WbL7J9VTvgsjuFRPu3tGZZVuc
JamfPolicyUploader: Expires: 2022-10-23T05:03:10.94Z
JamfPolicyUploader: Jamf Pro Version: 10.42.0-t1665776579
JamfPolicyUploader: Token auth will be used,
JamfPolicyUploader: Policy 'Microsoft Office' already exists: ID 752
JamfPolicyUploader: Replacing existing policy as 'replace_policy' is set to True
JamfPolicyUploader: Uploading Policy...
JamfPolicyUploader: Policy upload attempt 1
JamfPolicyUploader: API Error: Problem with script
Receipt written to ~/Library/AutoPkg/Cache/local.Office/receipts/local.Office-receipt-20221022-213311.plist
The following recipes failed:
local.Office
Error in local.Office: Processor: com.github.grahampugh.jamf-upload.processors/JamfPolicyUploader: Error: WARNING: Policy 'Microsoft Office' update failed due to the following conflict: Problem with script
The following new items were downloaded:
Download Path
-------------
~/Library/AutoPkg/Cache/local.Office/downloads/Microsoft Office Unlicensed-16.66.1.pkg",
WARNING: Policy 'Microsoft Office' update failed due to the following conflict: Problem with script
Failed.
Error was a problem with the script that was referenced in the Policy Template. This will help with faster debugging.
ProcessorError
if a unaccounted for status_code is received~Example for a
409
error:Error was a problem with the script that was referenced in the Policy Template. This will help with faster debugging.