Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Sajid Alam <[email protected]>
  • Loading branch information
SajidAlamQB committed Jul 17, 2024
1 parent 41137d9 commit c4cc6a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/kedro_viz/api/rest/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ async def update_preferences(preferences: UserPreference):
try:
DataNodeMetadata.set_is_all_previews_enabled(preferences.showDatasetPreviews)
return {"message": "Preferences updated successfully"}
except Exception as e:
logger.error(f"Failed to update preferences: {str(e)}")
raise HTTPException(status_code=500, detail="Failed to update preferences")
except Exception as exception:
logger.error("Failed to update preferences: %s", str(exception))
raise HTTPException(
status_code=500, detail="Failed to update preferences"
) from exception


@router.get(
Expand Down

0 comments on commit c4cc6a1

Please sign in to comment.