Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit b840c77

Browse files
mustafasalfitinitin-vavdiya
authored andcommitted
fix: remove try catch
1 parent 02b1f5a commit b840c77

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/eclipse/tractusx/managedidentitywallets/service/CommonService.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.eclipse.tractusx.managedidentitywallets.exception.WalletNotFoundProblem;
3131
import org.eclipse.tractusx.managedidentitywallets.utils.CommonUtils;
3232
import org.eclipse.tractusx.managedidentitywallets.utils.Validate;
33+
import org.eclipse.tractusx.ssi.lib.exception.did.DidParseException;
3334
import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential;
3435
import org.springframework.stereotype.Service;
3536

@@ -54,12 +55,7 @@ public Wallet getWalletByIdentifier(String identifier) {
5455
if (CommonUtils.getIdentifierType(identifier).equals(StringPool.BPN)) {
5556
wallet = walletRepository.getByBpn(identifier);
5657
} else {
57-
try {
58-
wallet = walletRepository.getByDid(identifier);
59-
} catch (Exception e) {
60-
log.error("Error while parsing did {}", StringEscapeUtils.escapeJava(identifier), e);
61-
throw new WalletNotFoundProblem("Error while parsing did " + identifier);
62-
}
58+
wallet = walletRepository.getByDid(identifier);
6359
}
6460
Validate.isNull(wallet).launch(new WalletNotFoundProblem("Wallet not found for identifier " + identifier));
6561
return wallet;

0 commit comments

Comments
 (0)