another thing is that it can be an rhs, and then t...
# codingconventions
d
another thing is that it can be an rhs, and then the first variant get's kinda ugly
t
I prefer the last one but with the exception arguments chopped up on separate lines to avoid too long lines.
Copy code
if (hasFlightsOrMinPrices(searchParams, response))
    response
else
    throw ServerError.FlightsNotFound(
        key = “FlightsNotFound”,
        userMessage = “message”,
        debugMessage = “no flights in response”
    )