-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: include object id/key in invalid object errors (#301)
* feat: include object id/key in invalid object errors - Include object `id`/`key` in errors when objects not found in datafile - Modifies invalid object `id`/`key` log messages to make them consistent Include object `id`/`key` in errors when an object is not found makes them available to the user or the custom error handler. One example of why this is useful is that the `key` of an experiment could be used within a custom error handler to fetch the details of the experiment. This would indicate whether the experiment has been paused (in which case the error could be ignored) or archived (in which case the code referencing the experiment should be removed from the application). * feat: expose object identifiers as error properties - Expose the object identifiers as error properties so that they are easier to use in error handlers. - Encapsulate the error messages within the error objects to enforce consistency and to simplify initialization - Use the messages of the error objects as log messages to enforce consistency and to simplify logging * Update lib/optimizely/exceptions.rb typo identifier * identifier typo * identifier typo * identifier typo * identifier typo * identifier typo --------- Co-authored-by: Matjaz Pirnovar <[email protected]>
- Loading branch information
Showing
3 changed files
with
105 additions
and
45 deletions.
There are no files selected for viewing
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
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