-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error message for errant func registration
The observed behavior in the wild was that a double registration would complain (correctly), but reference `None` as the function id. Clearly not helpful. Improve the situation by referencing the cached value, but also relax the double-registration constraint slightly: if the calling code attempts to re-register the function with the _same_ id, then that's odd -- so warn about it -- but let it go. Still raise the exception for other errant registration attempts. [sc-36241]
- Loading branch information
1 parent
9b211ab
commit 0e2744d
Showing
3 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog.d/20241008_092953_kevin_improve_double_registration_error_message.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Bug Fixes | ||
^^^^^^^^^ | ||
|
||
- Fix ``function_id`` in error message that previously referenced ``None`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters