dev add monitoring basic
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-03-03 11:38:22 +07:00
parent 1124cddb5a
commit 404e1a6bee
2 changed files with 8 additions and 1 deletions
@@ -192,9 +192,15 @@ public class ApiController {
return ResponseEntity.ok(response); return ResponseEntity.ok(response);
} catch(IllegalArgumentException e) {
log.error("Error with file extensions : {}", e.getMessage(), e);
return ResponseEntity.ok().body(new BaseResponse(MessageCode.FILE_FOR_SEARCH_NOT_VALID.getCode(),
MessageCode.FILE_FOR_SEARCH_NOT_VALID.getCode(),
MessageCode.FILE_FOR_SEARCH_NOT_VALID.getDescription(), null));
} catch (Exception e) { } catch (Exception e) {
log.error("Error finding similar files: {}", e.getMessage(), e); log.error("Error finding similar files: {}", e.getMessage(), e);
return ResponseEntity.ok().body(new BaseResponse(0, MessageCode.INVALID_FIELD.getCode(), return ResponseEntity.ok().body(new BaseResponse(MessageCode.INVALID_FIELD.getCode(),
MessageCode.INVALID_FIELD.getCode(),
MessageCode.INVALID_FIELD.getDescription(), null)); MessageCode.INVALID_FIELD.getDescription(), null));
} }
} }
@@ -49,6 +49,7 @@ public enum MessageCode {
COMPANY_ALREADY_EXISTS(2, "Company already exists"), COMPANY_ALREADY_EXISTS(2, "Company already exists"),
USER_LIMIT_IS_OVER(2, "Over user limits"), USER_LIMIT_IS_OVER(2, "Over user limits"),
ERROR_TARIFF_INFO(2, "Erorr with tariff info"), ERROR_TARIFF_INFO(2, "Erorr with tariff info"),
FILE_FOR_SEARCH_NOT_VALID(2, "File for search unsupported"),
USER_NOT_ACTIVE(2, "User not active"); USER_NOT_ACTIVE(2, "User not active");
private final Integer code; private final Integer code;