๐ฏ Objectives
ืืกืืื ืืืขืืื ืชืืข:
- ืืืืกืืฃ decorators ืืืชืืืื ืืืฉืืช
- ืืืืฉื Error Handling ืืกืืกื
- ืืืืืฃ ืืื ื ืชืืืื ืืืื ืืื ืึพAPI
- ืืฉืื validation ืึพJSON requests
ืืืง 1 โ ืขืงืจืื Response ืืืื
ืืกืืจ
ืื endpoint ืืืื ืืืืืืจ ืืื ื ืงืืืข:
{
"success": true,
"data": {}
}
ืืืืงืจื ืฉื ืฉืืืื:
{
"success": false,
"error": "message"
}
ืืืง 2 โ ืืฆืืจืช Decorator ืืืืคืื ืืฉืืืืืช
ืืกืืจ
ื ืืฆืืจ decorator ืฉืชืืคืก ืฉืืืืืช ืืืืืืจ ืชืืืื ืืืืื.
ืืืืืฉ handle_errors