Skip to content

Commit 4b0ea7b

Browse files
authored
Port occupied: Clean Logging (#2630)
* test(custom-error): update expected status code from 500 to 400 in custom error handling test * fix(router): handle `PortOccupiedException` with clear exception propagation - Added specific handling for `PortOccupiedException` to improve runtime diagnosis and error clarity during router startup. * fix(router): combine exception handlers into a single block for improved readability and consistency
1 parent db0d8f8 commit 4b0ea7b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

core/src/main/java/com/predic8/membrane/core/router/DefaultRouter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ public void start() {
165165
handleDuplicateOpenAPIPaths(e);
166166
} catch (OpenAPIParsingException e) {
167167
handleOpenAPIParsingException(e);
168+
} catch (PortOccupiedException e) {
169+
throw new RuntimeException(e);
168170
} catch (Exception e) {
169171
log.error("Could not start router.", e);
170172
if (e instanceof RuntimeException)

0 commit comments

Comments
 (0)