Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched to ClientError exception in AWS S3 Credentials Setting #251

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/deepchecks_monitoring/ee/api/v1/data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import boto3
import sqlalchemy as sa
from botocore.config import Config
from botocore.exceptions import BotoCoreError
from botocore.exceptions import ClientError
from fastapi import Depends, Response
from pydantic.main import BaseModel
from sqlalchemy.ext.asyncio import AsyncSession
Expand Down Expand Up @@ -74,7 +74,7 @@ async def new_data_source(body: DataSourceCreationSchema,
config=Config(region_name=data_source.parameters['region'])
)
sts.get_caller_identity()
except BotoCoreError as e:
except ClientError as e:
raise BadRequest('Invalid credentials to AWS') from e
else:
raise BadRequest('Invalid data source type')
Expand Down
Loading