DEV Community

Cover image for Days 47-48. Broken API
Kiolk
Kiolk

Posted on

Days 47-48. Broken API

What I did:

Today, I have a two-part report on the progress. Yesterday, I worked on the searching logic for organizations. It worked well for finding organizations that matched the input. However, the application crashed when I tried to sort by the newest or oldest organizations. I wondered why this happened? I found that the response returned a 500 error with an HTML page in the body. The kotlinx.serialization library tries to parse it and throws an exception. I checked this behavior on the web and found the same response, so it isn't my fault. 

How can I address this issue? The general solution is to implement exception handling: wrap the result and process it in the presentation layer. I found a helpful explanation of this approach in a video. One aspect bothered me— ApiOperation object is exposed to the presentation layer. I'll try this solution to handle the issue.

Additionally, I added a new Lottie file to display when the search returns an empty result. I discovered a problem: many Lottie files were rendered incorrectly on the mobile. I'm not sure where the problem lies.
Empty state for search result
What I will do:

If you want to join the project, just leave a comment here, or write a message in LinkedIn.

What help I'm looking for:

Designer (create design of application in Figma)
Android/KMM developer
Any other help related to the project.

My timeline:

Day 1. Deep breath and dive
Day 2. Networking layer.
Day 3. Loading of articles.
Day 4. ArticleItem.
Day 5. Localization.
Day 6. Work on Sunday.
Day 7. First week.
Day 8. Enjoying coding.
Day 9. Expect/actual.
Day 10. TODOs.
Day 11. Friday evening.
Day 12. Frustration.
Day 13. Blocker
Day 14. Monday
Day 15. Reactions
Day 16. Feed
Day 17. stringWithFormat
Day 18. Comment
Day 19. 1 percent
Day 20. A bit of progress
Day 21. Pagination
Day 22. Lottie animation
Day 23. Sorting of articles
Day 24. Step by step
Day 25. Broken endpoint?
Day 26. After party
Day 27. Burnout
Day 28. Opportunity for growth
Day 29. Hard work
Day 30. Old code
Day 31. Technical debt
Day 32. API calls
Day 33. Generic response
Day 34. Response
Day 35. Coderabbit
Day 36. What is the power of Pull Request?
Day 37. Search challenge
Day 38. Search items
Day 39. A party
Day 40. Fixing UI
Day 41. Surpassed record
Day 42. Monday
Day 43. Composition
Day 44. Timestamp
Day 45. Time manipulation
Day 46. Broken pipelines

You can find more useful content on my LinkedIn page, on X, in Medium or Mastodon.

See you tomorrow. 

Top comments (0)