Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbalakirev authored Sep 3, 2024
1 parent 2ab21b5 commit 61ce2b5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@ The Corbado Java SDK raises exceptions for all errors except those that occur in
- `StandardException` for everything else (client side)
- `JWTVerificationException` and its subclasses and `JwkException` in session service for JWT/JWK errors.

'SessionService' returns 'SessionValidationResult' as result of token validation. You can check whether any errors occurred and handle them if needed:
```Java
final SessionValidationResult validationResp =
sdk.getSessions().getAndValidateCurrentUser(cboShortSession);

if (validationResp.getError() != null) {
// Handle invalid token.
throw validationResp.getError();
}
```

If the Backend API returns a HTTP status code other than 200, the Corbado Java SDK throws a `CorbadoServerException`. The `CorbadoServerException`class parses the server response to access all important data. One of the test cases:
```Java
UserService users = sdk.getUsers();
Expand Down

0 comments on commit 61ce2b5

Please sign in to comment.