Skip to content

Commit

Permalink
chore: minor improvements 2
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Jan 3, 2025
1 parent 69ac89b commit cb0f336
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,7 @@ class CapabilitiesManager implements ICapabilitiesManager {
* @param error The error object
*/
onError(error: unknown): void {
if (this.errorHandler) {
this.errorHandler.onError(error, CAPABILITIES_MANAGER);
} else {
throw error;
}
this.errorHandler.onError(error, CAPABILITIES_MANAGER);

Check warning on line 208 in packages/analytics-js/src/components/capabilitiesManager/CapabilitiesManager.ts

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js/src/components/capabilitiesManager/CapabilitiesManager.ts#L208

Added line #L208 was not covered by tests
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ class EventRepository implements IEventRepository {
* Handles error
* @param error The error object
* @param customMessage a message
* @param shouldAlwaysThrow if it should throw or use logger
*/
onError(error: unknown, customMessage?: string): void {
if (this.errorHandler) {
Expand Down

0 comments on commit cb0f336

Please sign in to comment.