Standardize exception naming in VeranstaltungController: replace unused exception variable names with _ for cleaner and more concise code.
This commit is contained in:
+2
-2
@@ -38,7 +38,7 @@ class VeranstaltungController(
|
|||||||
val offset = call.request.queryParameters["offset"]?.toInt() ?: 0
|
val offset = call.request.queryParameters["offset"]?.toInt() ?: 0
|
||||||
|
|
||||||
val organizerId = call.request.queryParameters["organizerId"]?.let {
|
val organizerId = call.request.queryParameters["organizerId"]?.let {
|
||||||
try { Uuid.parse(it) } catch (e: Exception) {
|
try { Uuid.parse(it) } catch (_: Exception) {
|
||||||
return@get call.respond(
|
return@get call.respond(
|
||||||
HttpStatusCode.BadRequest,
|
HttpStatusCode.BadRequest,
|
||||||
ApiResponse.error<Any>("INVALID_ORGANIZER_ID", "Invalid organizerId format")
|
ApiResponse.error<Any>("INVALID_ORGANIZER_ID", "Invalid organizerId format")
|
||||||
@@ -187,7 +187,7 @@ class VeranstaltungController(
|
|||||||
ApiResponse.error<Any>("MISSING_ID", "Event ID is required")
|
ApiResponse.error<Any>("MISSING_ID", "Event ID is required")
|
||||||
)
|
)
|
||||||
|
|
||||||
val eventId = try { Uuid.parse(eventIdString) } catch (e: Exception) {
|
val eventId = try { Uuid.parse(eventIdString) } catch (_: Exception) {
|
||||||
return@delete call.respond(
|
return@delete call.respond(
|
||||||
HttpStatusCode.BadRequest,
|
HttpStatusCode.BadRequest,
|
||||||
ApiResponse.error<Any>("INVALID_ID", "Invalid event ID format")
|
ApiResponse.error<Any>("INVALID_ID", "Invalid event ID format")
|
||||||
|
|||||||
Reference in New Issue
Block a user