Add language support for getCatalogedErrorMessage#34
Merged
Conversation
43544b2 to
3418b9c
Compare
mattbaileyuk
requested changes
Jun 1, 2026
mattbaileyuk
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution; could you please add at least one test showing this behaviour so we can avoid regressing it later.
added 2 commits
June 8, 2026 15:01
Signed-off-by: ziyad-onji <ziyad.onji@ibm.com>
34bef4d to
2f1fadb
Compare
Author
|
@mattbaileyuk, Added tests, please have a look again. Thanks. |
mattbaileyuk
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌍 Overview
This PR adds support for language parameters in the message catalog manager, enabling error messages to be displayed in the user's preferred language. This is part of a larger multi-language support initiative across the AppConnect platform.
📋 Summary
🎯 Motivation
Currently, all error messages are displayed in English regardless of the user's language preference. This PR enables the system to:
📝 Changes Made
1. Updated
lib/middleware/errorMiddleware.jsAdded optional
languageparameter toformattingMiddleware()function:Changes:
languageparameter (optional, defaults to 'en')getCatalogedErrorMessage()methodUsage Example:
2. Updated
lib/message-catalog-manager.jsAdded optional
languageparameter togetCatalogedErrorMessage()method:Changes:
languageparameter (optional, defaults to 'en')getMessage()methodNote: The existing
getMessage()method already supported language parameters, so no changes were needed there.