generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: [Orchestration] Filtering details and additional convenience on exception #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
newtork
merged 43 commits into
main
from
feat/orchestration/filter-exception-handling-factory
Aug 5, 2025
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
e863592
Input Filtering resolved
rpanackal c16677f
Input Filtering and Output filtering resolved
rpanackal 842d53c
Refactor - from enum to individual types of filtering exception
rpanackal 4a1a026
Refactor - from enum to individual types of filtering exception
rpanackal 69087b6
Exception factory introduced
rpanackal 6e48dab
Merge branch 'refs/heads/main' into feat/orchestration/filter-excepti…
rpanackal e6d371c
Finish merge with main
rpanackal 485482f
Update tests and add better javadocs
rpanackal 55e1ee5
Merge branch 'refs/heads/main' into feat/orchestration/filter-excepti…
rpanackal f6f3528
Updating error messages
rpanackal efbf415
Merge branch 'refs/heads/main' into feat/orchestration/filter-excepti…
rpanackal d22b715
Integrating charles suggestions and extend unit tests
rpanackal 4699a43
Integrating charles suggestions and extend unit tests
rpanackal bbbc813
Merge branch 'feat/orchestration/filter-exception-handling-factory' o…
rpanackal bcf8c44
Filter exc classes non static and setter for client error
rpanackal 8e3a379
Filter exc classes better static
rpanackal 25f2758
Formatting
bot-sdk-js e503900
Suppress unchecked warning
rpanackal 90e3bbd
Merge remote-tracking branch 'origin/feat/orchestration/filter-except…
rpanackal 31892ea
Formatting
bot-sdk-js 535c906
cleaning up
rpanackal 0d25be7
Merge remote-tracking branch 'origin/feat/orchestration/filter-except…
rpanackal df8ce81
Merge branch 'refs/heads/main' into feat/orchestration/filter-excepti…
rpanackal 2c0f2ea
fix method reference
rpanackal 6d3525f
Shortcut getErrorResponse
rpanackal c2cacc7
Merge remote-tracking branch 'refs/remotes/origin/main' into feat/orc…
rpanackal c9c5c96
merging change with careful logging
rpanackal 180d337
Merge branch 'main' into feat/orchestration/filter-exception-handling…
rpanackal 7b631c1
Release notes
rpanackal 13d0f91
Update core/src/main/java/com/sap/ai/sdk/core/common/ClientResponseHa…
rpanackal 2bc9a24
Update orchestration/src/test/java/com/sap/ai/sdk/orchestration/Orche…
rpanackal 0578560
Sample app tests use filter specific convenience pn exception
rpanackal c1b6440
Merge branch 'feat/orchestration/filter-exception-handling-factory' o…
rpanackal cf59964
Review suggestion
rpanackal 2293fdc
Formatting
bot-sdk-js b07d789
Merge branch 'main' into feat/orchestration/filter-exception-handling…
rpanackal 6a348da
Handle class cast exceptions
newtork a9b48d4
Format
newtork 789e12b
Format
newtork 9fc9108
Merge branch 'main' into feat/orchestration/filter-exception-handling…
newtork e4b179f
Fix compilation
newtork 5252a2c
Merge remote-tracking branch 'origin/feat/orchestration/filter-except…
newtork 0235bf1
Fix compilation
newtork File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
37 changes: 37 additions & 0 deletions
37
core/src/main/java/com/sap/ai/sdk/core/common/ClientExceptionFactory.java
This file contains hidden or 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,37 @@ | ||
| package com.sap.ai.sdk.core.common; | ||
|
|
||
| import com.google.common.annotations.Beta; | ||
| import javax.annotation.Nonnull; | ||
| import javax.annotation.Nullable; | ||
|
|
||
| /** | ||
| * A factory whose implementations can provide customized exception types and error mapping logic | ||
| * for different service clients or error scenarios. | ||
| * | ||
| * @param <E> The subtype of {@link ClientException} to be created by this factory. | ||
| * @param <R> The subtype of {@link ClientError} payload that can be processed by this factory. | ||
| */ | ||
| @Beta | ||
| public interface ClientExceptionFactory<E extends ClientException, R extends ClientError> { | ||
|
|
||
| /** | ||
| * Creates an exception with a message and optional cause. | ||
| * | ||
| * @param message A descriptive message for the exception. | ||
| * @param cause An optional cause of the exception, can be null if not applicable. | ||
| * @return An instance of the specified {@link ClientException} type | ||
| */ | ||
| @Nonnull | ||
| E build(@Nonnull final String message, @Nullable final Throwable cause); | ||
|
|
||
| /** | ||
| * Creates an exception from a given message and an HTTP error response that has been successfully | ||
| * deserialized into a {@link ClientError} object. | ||
| * | ||
| * @param message A descriptive message for the exception. | ||
| * @param clientError The structured {@link ClientError} object deserialized from the response. | ||
| * @return An instance of the specified {@link ClientException} type | ||
| */ | ||
| @Nonnull | ||
| E buildFromClientError(@Nonnull final String message, @Nonnull final R clientError); | ||
newtork marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.