Skip to content

refactor: Stop throwing errors for 404#57

Merged
iFergal merged 4 commits intomainfrom
feature/task-54-stop-throwing-erros-for-404
Sep 4, 2025
Merged

refactor: Stop throwing errors for 404#57
iFergal merged 4 commits intomainfrom
feature/task-54-stop-throwing-erros-for-404

Conversation

@Sotatek-DucPhung
Copy link
Collaborator

@Sotatek-DucPhung Sotatek-DucPhung commented Aug 28, 2025

  • Changed methods in multiple classes to return Optional for identifier retrieval, improving null safety.
  • Adjusted related test cases to accommodate the new Optional return type.

issue: #54

…ot found cases

- Changed methods in multiple classes to return Optional for identifier retrieval, improving null safety.
- Updated exception handling to throw IllegalArgumentException when identifiers are not found.
- Adjusted related test cases to accommodate the new Optional return type.
@iFergal iFergal merged commit d822d01 into main Sep 4, 2025
3 checks passed
@iFergal iFergal deleted the feature/task-54-stop-throwing-erros-for-404 branch September 4, 2025 08:21
yashhzd added a commit to yashhzd/cf-signify-java that referenced this pull request Feb 14, 2026
…et()

Complete the Optional refactoring started in cardano-foundation#57 for the remaining
methods that still threw exceptions for not-found conditions:

- SignifyClient.state() returns Optional<State> instead of throwing
  IllegalArgumentException on 404
- SignifyClient.connect() uses orElseThrow() for clear error messaging
- Coring.KeyEvents.get() returns Optional<Object> with 404 check
- Coring.Config.get() returns Optional<Object> with 404 check
- TestUtils.getOrCreateClient() uses state().isEmpty() instead of
  try/catch flow control

Closes cardano-foundation#49
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