Skip to content

feat(error): Added class to reproduce structure of API error, removed unecessary request on http request layer.#468

Merged
Murike merged 5 commits intomainfrom
feature/standard-error-support
Jan 30, 2026
Merged

feat(error): Added class to reproduce structure of API error, removed unecessary request on http request layer.#468
Murike merged 5 commits intomainfrom
feature/standard-error-support

Conversation

@Murike
Copy link
Contributor

@Murike Murike commented Jan 21, 2026

User description

[SDK] Add Standard Error Support to TypeScript SDK

SC-51444

Description

  • Added class to mirror error structure from API;
  • Added support in catch block to convert error type;


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Introduces a standardized error handling mechanism across the TypeScript SDK by implementing the GalileoAPIError class and centralizing error validation within the BaseClient. This refactoring removes redundant error handling from individual service clients and enhances the GalileoLogger's resilience by replacing error throws with console logging in streaming modes.

TopicDetails
Logger Resilience Enhance the robustness of the GalileoLogger in streaming mode by replacing error throws with console.error or console.warn calls. This prevents process interruptions due to internal logging issues and ensures that logging operations gracefully handle unexpected states.
Modified files (2)
  • src/utils/galileo-logger.ts
  • tests/utils/galileo-logger.test.ts
Latest Contributors(2)
UserCommitDate
Murikefeat-stream-Created-ba...January 27, 2026
juandrucker@rungalileo.iofeat-support-ingesting...July 25, 2025
Service Client Simplification Simplify service-level API clients by removing redundant try-catch blocks and specific API exception classes, such as ExperimentTagsAPIException. This change leverages the new centralized error handling in BaseClient, reducing boilerplate and improving code clarity in individual services.
Modified files (3)
  • src/api-client/services/experiment-tags-service.ts
  • src/index.ts
  • src/utils/errors.ts
Latest Contributors(2)
UserCommitDate
Murikefeat-stream-Created-ba...January 27, 2026
jweiler@galileo.aifeat-Add-GalileoMetric...December 15, 2025
Centralized Error Handling Refactor the BaseClient to centralize all API error handling logic, including parsing streaming responses and generating GalileoAPIError instances. This involves removing old error parsing methods, renaming validateResponse to validateAxiosResponse, and introducing new private methods like validateError and generateApiError to streamline error processing.
Modified files (2)
  • src/api-client/base-client.ts
  • tests/api-client/base-client.test.ts
Latest Contributors(2)
UserCommitDate
Murikefeat-experiments-Added...January 09, 2026
vamaq@users.noreply.gi...chore-Include-headers-...September 10, 2025
Structured API Errors Implement the GalileoAPIError class, GalileoAPIStandardErrorData interface, and isGalileoAPIStandardErrorData type guard to provide a structured and consistent way to represent API errors, aligning with a predefined error catalog.
Modified files (2)
  • src/types/errors.types.ts
  • tests/types/errors.types.test.ts
Latest Contributors(1)
UserCommitDate
Murikefeat-experiments-Added...January 09, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

…ed error logging on some stream mode functions.
…ed error logging on some stream mode functions, added and updated tests.
@Murike Murike force-pushed the feature/standard-error-support branch from 97f0d7a to 8d2cce6 Compare January 27, 2026 16:16
…roved types, removed unecessary error management functions.
@Murike Murike merged commit 2c870f3 into main Jan 30, 2026
8 checks passed
@Murike Murike deleted the feature/standard-error-support branch January 30, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants