Skip to content

Commit 3ff34bf

Browse files
committed
Merge develop into main
2 parents a3faa27 + ef246e3 commit 3ff34bf

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ WiseMapping is a free, open-source, web-based mind mapping tool designed for ind
77
WiseMapping provides a comprehensive set of features for creating, managing, and sharing mind maps:
88

99
- **🎨 Visual Mapping**: Create rich mind maps with icons, colors, fonts, and custom styling
10-
- **👥 Collaboration**: Share mind maps with team members and collaborate in real-time
10+
- **👥 Collaboration**: Share mind maps with team members with role-based access control
1111
- **📱 Multi-platform**: Access your maps from any device with a modern web browser
1212
- **📊 Export & Import**: Import existing maps from Freeplane, XMind, and Mind Manager. Export mind maps to PDF, SVG, Freeplane, and other formats
1313
- **🔗 Document Linking**: Integrate external documents and resources into your mind maps

‎distribution/app/Dockerfile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ RUN mkdir -p /app \
8585
/var/log/supervisor \
8686
/run/nginx \
8787
/usr/share/nginx/html \
88-
/var/lib/nginx
88+
/var/lib/nginx && \
89+
mkdir -p /var/lib/nginx/tmp/client_body && \
90+
chown -R 100:101 /var/lib/nginx/tmp
8991

9092
# Copy backend JAR
9193
COPY --from=backend-builder --chown=wisemapping:wisemapping /build/wise-api/target/wisemapping-api.jar /app/wisemapping-api.jar

‎wise-api/src/main/java/com/wisemapping/config/GlobalExceptionHandler.java‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public RestErrors handleAuthorizationDeniedException(@NotNull final Authorizatio
159159
@ExceptionHandler(ValidationException.class)
160160
@ResponseBody
161161
public ResponseEntity<RestErrors> handleValidationErrors(@NotNull final ValidationException ex) {
162-
logger.debug(ex.getMessage(), ex);
162+
logger.debug("Validation error: {}", ex.getMessage());
163163
RestErrors error = new RestErrors(ex.getErrors(), messageSource);
164164
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(error);
165165
}
@@ -220,8 +220,13 @@ private boolean isExpectedException(Throwable ex) {
220220
public RestErrors handleSecurityErrors(@NotNull UndeclaredThrowableException ex) {
221221
final Throwable expected = getExpectedException(ex.getCause());
222222
if (expected != null) {
223-
logger.debug("Expected nested exception handled: {}", expected.getMessage());
223+
if (!(expected instanceof LockException)) {
224+
logger.debug("Expected nested exception handled: {}", expected.getMessage());
225+
}
224226
if (expected instanceof ClientException) {
227+
if (expected instanceof LockException) {
228+
return handleLockException((LockException) expected);
229+
}
225230
return handleClientErrors((ClientException) expected);
226231
} else if (expected instanceof ValidationException) {
227232
return new RestErrors(((ValidationException) expected).getErrors(), messageSource);
@@ -341,6 +346,15 @@ public RestErrors handleWrongAuthenticationTypeException(@NotNull WrongAuthentic
341346
return new RestErrors(message, Severity.WARNING);
342347
}
343348

349+
@ExceptionHandler(LockException.class)
350+
@ResponseStatus(HttpStatus.BAD_REQUEST)
351+
@ResponseBody
352+
public RestErrors handleLockException(@NotNull LockException ex) {
353+
logger.warn(ex.getMessage());
354+
final Locale locale = LocaleContextHolder.getLocale();
355+
return new RestErrors(ex.getMessage(messageSource, locale), ex.getSeverity(), ex.getTechInfo());
356+
}
357+
344358
@ExceptionHandler(ClientException.class)
345359
@ResponseStatus(HttpStatus.BAD_REQUEST)
346360
@ResponseBody

0 commit comments

Comments
 (0)