You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this is something we fix via documentation - or commenting-out the Custom Fields parts of the example settings, I don't know.
But I've had a few customers now who have had 'problems' with jamf2snipe because they didn't read the documentation (and, let's be honest, nobody ever does), and just took the example settings file, tweaked it, and ran with it. We have the built-in expectation that all users will know how to use Snipe-IT, but I've tended to find that that expectation just isn't valid most of the time.
So we can either comment-out the Custom Fields bits (which feels wrong, tbh?) or make it so that you get a nicer, more glaring error when you try and set a nonexistent custom field. I don't know exactly how you'd do that though; I don't think Snipe-IT is going to give you a particularly useful error message. Though I'm not sure off the top of my head. One thing we certainly could do is hit the Custom Fields API (we'd have to parse _snipeit_ram_2 into just 2 for that), and confirm that the field exists, crashing out (with a convenient error message) if not?
Or maybe we just comment the dang things out. Not sure. _snipeit_mac_address_1 is pretty dang likely to be there (so long as no one has deleted it) so we could leave that one uncommented.
The text was updated successfully, but these errors were encountered:
I think I might be able to address this by changing one of the methods - It's kinda the 'universal request' method for all Snipe-IT calls - and making it so that it looks for JSON that returns {"status": "error"} and then tries to throw with the message - I'll play around with it now that I have a good test environment.
Maybe this is something we fix via documentation - or commenting-out the Custom Fields parts of the example settings, I don't know.
But I've had a few customers now who have had 'problems' with jamf2snipe because they didn't read the documentation (and, let's be honest, nobody ever does), and just took the example settings file, tweaked it, and ran with it. We have the built-in expectation that all users will know how to use Snipe-IT, but I've tended to find that that expectation just isn't valid most of the time.
So we can either comment-out the Custom Fields bits (which feels wrong, tbh?) or make it so that you get a nicer, more glaring error when you try and set a nonexistent custom field. I don't know exactly how you'd do that though; I don't think Snipe-IT is going to give you a particularly useful error message. Though I'm not sure off the top of my head. One thing we certainly could do is hit the Custom Fields API (we'd have to parse
_snipeit_ram_2
into just2
for that), and confirm that the field exists, crashing out (with a convenient error message) if not?Or maybe we just comment the dang things out. Not sure.
_snipeit_mac_address_1
is pretty dang likely to be there (so long as no one has deleted it) so we could leave that one uncommented.The text was updated successfully, but these errors were encountered: