DEV Community

Cover image for Kotlin in the backend, Spring with Kotlin Part 2 — Exception Handling
Rodrigo Silva
Rodrigo Silva

Posted on

Kotlin in the backend, Spring with Kotlin Part 2 — Exception Handling

Handling exceptions is a crucial part when developing any sort of application, certain errors occur by calling a method of a library with invalid arguments, others happen just for doing something wrong. However, some exceptions can be thrown by ourselves because what was asked to be done by us is not possible.

In the previous post, we developed a simple Web API using Kotlin and Spring, this API allowed us to request and alter information about books in our system, however, when errors are thrown, the information sent to the API client is not the clearest, who becomes unaware of what really went wrong.

Rest of this article:
https://rodrigo-silva96.medium.com/kotlin-in-the-backend-spring-with-kotlin-part-2-exception-handling-55524414e154

Top comments (0)