Skip to content

Conversation

ghazwarhili
Copy link
Contributor

No description provided.

String userId = (String) msg.getHeaders().get(HEADER_USER_ID);
String fileName = (String) msg.getHeaders().get(HEADER_FILE_NAME);
UUID exportUuid = UUID.fromString(Objects.requireNonNull(msg.getHeaders().get(HEADER_EXPORT_UUID)).toString());
String errorMessage = (String) msg.getHeaders().get(HEADER_ERROR_MESSAGE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String errorMessage = (String) msg.getHeaders().get(HEADER_ERROR_MESSAGE);
String errorMessage = (String) msg.getHeaders().get(HEADER_ERROR);

conversion server using 'error' key for error message, idem in the front

networkConversionServerResponse -> {
exportNetworkResponse.setStatus(HttpStatus.ACCEPTED.value());
exportNetworkResponse.setContentType(MediaType.APPLICATION_JSON_VALUE);
String responseJson = "{\"message\":\"Export started, you will receive a notification when ready\"}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is useful when return a non translated message? I dont see it is used in the front

If you really need a returned message, using objectMapper.createObjectNode() to build a typed object instead of a json string directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants