"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
-__version__ = "0.1.4"
+__version__ = "0.1.5"
from .applications import FastAPI
from .routing import APIRouter
from pydantic.types import EmailStr # type: ignore
except ImportError:
logging.warning(
- "email-validator not installed, email fields will be treated as str.\n" +
- "To install, run: pip install email-validator"
+ "email-validator not installed, email fields will be treated as str.\n"
+ + "To install, run: pip install email-validator"
)
+
class EmailStr(str): # type: ignore
pass
body[field] = value
else:
body = await request.json()
- except Exception:
+ except Exception as e:
+ logging.error("Error getting request body", e)
raise HTTPException(
status_code=400, detail="There was an error parsing the body"
)