Attempt at reducing Rollbar usage via add() on null in SCIM #9
+4
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So the line that we're attempting to put guardrails around is the one that we've been seeing tons of on Rollbar. It has to do with some level of SCIM misconfiguration - I think when a user tries to map a 'subtype' that we don't handle of something that we do handle - for example, we do handle phone numbers, but we don't handle Fax numbers. So I think this exception is what we get when someone sends us one of those unhandled subtypes.
I deliberately tried to keep the change small - since it's hard to test. I also figure that since we're already 500'ing on these, if I did screw anything up, it wouldn't be any worse than we are already doing.
I stole some of the syntax from how the upstream author did similar errors -
laravel-scim-server/src/Helper.php
Line 250 in 6c77179
But changed the verbiage slightly so that we could, hopefully, better differentiate when the errors come from this message versus that one.
If we do decide to integrate this change, we will need to change the branch that we're pointing to from Snipe-IT, as well doing a selective
composer updateto make sure to pull the latest corrected version.