Shafiya Adzhani
Shafiya's Blog

Shafiya's Blog

Applying Design Principle in Error Handling

Jun 7, 20215 min read

During TDD phase, you will find out that your code need to be refactored. How do you know if your code should be refactored or not? Let's take a look at one of example: class CreatePTSerializer(PTSerializer): def validate(self, data): if ...