Skip to content

Commit b814eb4

Browse files
committed
fix: potential error handling when saving options
1 parent 761e7d2 commit b814eb4

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/main/java/io/supertokens/pluginInterface/webauthn/WebAuthNStorage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ WebAuthNStoredCredential saveCredentials(TenantIdentifier tenantIdentifier, WebA
3030
throws StorageQueryException, DuplicateCredentialException, UserIdNotFoundException,
3131
TenantOrAppNotFoundException;
3232

33-
WebAuthNOptions saveGeneratedOptions(TenantIdentifier tenantIdentifier, WebAuthNOptions optionsToSave) throws StorageQueryException;
33+
WebAuthNOptions saveGeneratedOptions(TenantIdentifier tenantIdentifier, WebAuthNOptions optionsToSave)
34+
throws StorageQueryException, DuplicateOptionsIdException, TenantOrAppNotFoundException;
3435

3536
WebAuthNOptions loadOptionsById(TenantIdentifier tenantIdentifier, String optionsId) throws StorageQueryException;
3637

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025, VRAI Labs and/or its affiliates. All rights reserved.
3+
*
4+
* This software is licensed under the Apache License, Version 2.0 (the
5+
* "License") as published by the Apache Software Foundation.
6+
*
7+
* You may not use this file except in compliance with the License. You may
8+
* obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
package io.supertokens.pluginInterface.webauthn.exceptions;
18+
19+
public class DuplicateOptionsIdException extends Exception {
20+
public DuplicateOptionsIdException() {
21+
}
22+
}

0 commit comments

Comments
 (0)