Skip to content

Commit 6fb133e

Browse files
committed
Build: Set env varibales for pre-build step (Github Workflow)
1 parent ed06c10 commit 6fb133e

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/full-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
with:
2020
java-version: ${{ matrix.java_version }}
2121
- name: Install
22-
run: mvn clean install --fail-never -q -pl '!docs' -P checkstyle
22+
run: mvn clean install --fail-never -q -pl '!docs'
23+
env:
24+
BUILD_PORT: 0
25+
BUILD_SECURE_PORT: 0
2326
- name: Build
2427
run: mvn clean checkstyle:checkstyle package -pl '!docs' -P checkstyle
2528
env:

.github/workflows/quick-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ jobs:
2020
with:
2121
java-version: ${{ matrix.java_version }}
2222
- name: Install
23-
run: mvn clean install --fail-never -q -pl '!docs' -P checkstyle
23+
run: mvn clean install --fail-never -q -pl '!docs'
24+
env:
25+
BUILD_PORT: 0
26+
BUILD_SECURE_PORT: 0
2427
- name: Build
2528
run: mvn clean checkstyle:checkstyle package -pl '!docs' -P checkstyle
2629
env:

jooby/src/main/java/io/jooby/DefaultContext.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,13 @@ default Context setResponseHeader(@Nonnull String name, @Nonnull Object value) {
571571
}
572572
router.getErrorHandler().apply(this, cause, statusCode);
573573
} catch (Exception x) {
574-
router.getLog()
575-
.error("error handler resulted in exception {} {}", getMethod(), pathString(), x);
574+
if (Server.connectionLost(x)) {
575+
router.getLog()
576+
.debug("error handler resulted in exception {} {}", getMethod(), getRequestPath(), x);
577+
} else {
578+
router.getLog()
579+
.error("error handler resulted in exception {} {}", getMethod(), getRequestPath(), x);
580+
}
576581
}
577582
}
578583
/** rethrow fatal exceptions: */

0 commit comments

Comments
 (0)