- Python Microservices Development
- Tarek Ziadé
- 123字
- 2021-07-02 18:54:23
Error handling and debugging
When something goes wrong in your application, it's important to be able to control what responses will the clients will receive. In HTML web apps, you usually get specific HTML pages when you encounter a 404 or a 50x error, and that's how Flask works out of the box. But when building microservices, you need to have more control on what should be sent back to the client--that's where custom error handlers come in handy.
The other important feature is the ability to debug what's wrong with your code when an unexpected error occurs. And Flask comes with a built-in debugger we'll discover in this section, which can be activated when your app runs in the debug mode.
推薦閱讀
- 現代C++編程:從入門到實踐
- 程序員面試白皮書
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- INSTANT Weka How-to
- 深度強化學習算法與實踐:基于PyTorch的實現
- Visual C++數字圖像處理技術詳解
- Hands-On Full Stack Development with Go
- Advanced Express Web Application Development
- C語言程序設計
- 小程序,巧應用:微信小程序開發實戰(第2版)
- Scratch3.0趣味編程動手玩:比賽訓練營
- Instant Debian:Build a Web Server
- 鴻蒙OS應用編程實戰
- 大學計算機基礎實驗指導
- IPython Interactive Computing and Visualization Cookbook