Skip to content

Commit 3db29a6

Browse files
authored
Handle BackendAuthError when getting project backends (#3393)
1 parent bd47f74 commit 3db29a6

File tree

1 file changed

+2
-1
lines changed
  • src/dstack/_internal/server/services/backends

1 file changed

+2
-1
lines changed

src/dstack/_internal/server/services/backends/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
AnyBackendConfigWithoutCreds,
2424
)
2525
from dstack._internal.core.errors import (
26+
BackendAuthError,
2627
BackendError,
2728
BackendInvalidCredentialsError,
2829
BackendNotAvailable,
@@ -224,7 +225,7 @@ async def get_project_backends_with_models(project: ProjectModel) -> List[Backen
224225
try:
225226
backend_record = get_stored_backend_record(backend_model)
226227
backend = await run_async(configurator.get_backend, backend_record)
227-
except BackendInvalidCredentialsError:
228+
except (BackendInvalidCredentialsError, BackendAuthError):
228229
logger.warning(
229230
"Credentials for %s backend are invalid. Backend will be ignored.",
230231
backend_model.type.value,

0 commit comments

Comments
 (0)