Skip to content

Commit

Permalink
fix: replace print with logger.log
Browse files Browse the repository at this point in the history
  • Loading branch information
gventuri committed Oct 14, 2024
1 parent a86abbf commit d17fa8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions backend/app/api/v1/processes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
import os
import traceback
import zipfile

from app.processing.process_queue import submit_process
Expand Down Expand Up @@ -510,7 +511,7 @@ async def get_file(step_id: int, db: Session = Depends(get_db)):
)

except Exception as e:
print(e)
logger.error(f"Error retrieving file: {str(e)}\n{traceback.format_exc()}")
raise HTTPException(status_code=500, detail="Failed to retrieve file")


Expand All @@ -528,5 +529,5 @@ def get_process_suggestion(
}

except Exception as e:
print(e)
logger.error(f"Error retrieving file: {str(e)}\n{traceback.format_exc()}")
raise HTTPException(status_code=500, detail="Failed to retrieve file")
2 changes: 1 addition & 1 deletion backend/app/api/v1/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ async def get_file(asset_id: int, db: Session = Depends(get_db)):
except HTTPException:
raise
except Exception as e:
print(e)
logger.error(f"Error retrieving file: {str(e)}\n{traceback.format_exc()}")
raise HTTPException(status_code=500, detail="An error occurred while retrieving the file. Please try again later.")


Expand Down

0 comments on commit d17fa8b

Please sign in to comment.