Don't send exceptions back as responses
This commit is contained in:
@@ -518,7 +518,7 @@ async def handle_wix_form(
|
|||||||
traceback_str = traceback.format_exc()
|
traceback_str = traceback.format_exc()
|
||||||
_LOGGER.error(f"Stack trace for handle_wix_form: {traceback_str}")
|
_LOGGER.error(f"Stack trace for handle_wix_form: {traceback_str}")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=500, detail=f"Error processing Wix form data: {str(e)}"
|
status_code=500, detail=f"Error processing Wix form data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ async def handle_wix_form_test(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
_LOGGER.error(f"Error in handle_wix_form_test: {str(e)}")
|
_LOGGER.error(f"Error in handle_wix_form_test: {str(e)}")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=500, detail=f"Error processing test data: {str(e)}"
|
status_code=500, detail=f"Error processing test data"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -724,7 +724,7 @@ async def alpinebits_server_handshake(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
detail=f"ERROR: Failed to decompress gzip content: {str(e)}",
|
detail=f"ERROR: Failed to decompress gzip content",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check content type (after decompression)
|
# Check content type (after decompression)
|
||||||
@@ -744,7 +744,7 @@ async def alpinebits_server_handshake(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
detail=f"ERROR: Failed to parse multipart/form-data: {str(e)}",
|
detail=f"ERROR: Failed to parse multipart/form-data",
|
||||||
)
|
)
|
||||||
elif "application/x-www-form-urlencoded" in content_type:
|
elif "application/x-www-form-urlencoded" in content_type:
|
||||||
# Parse as urlencoded
|
# Parse as urlencoded
|
||||||
@@ -802,7 +802,7 @@ async def alpinebits_server_handshake(
|
|||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_LOGGER.error(f"Error in AlpineBits handshake: {str(e)}")
|
_LOGGER.error(f"Error in AlpineBits handshake: {str(e)}")
|
||||||
raise HTTPException(status_code=500, detail=f"Internal server error: {str(e)}")
|
raise HTTPException(status_code=500, detail=f"Internal server error")
|
||||||
|
|
||||||
|
|
||||||
@api_router.get("/admin/stats")
|
@api_router.get("/admin/stats")
|
||||||
|
|||||||
Reference in New Issue
Block a user