How to Standardize error messages across module or project?

Hi, I’d like to be use a reference table to standardize error messages to make my application more consistent. I see we can change the standard “System Texts” in the project but it seems one cannot add their custom texts. Do I need to build my own repository or is there a standard functionality in mendix? Thx, Seb  
4 answers

Hi Seb,

I am not sure if I got your issue right, but did you tried a Batch replace?


Hi Johann,

I probably should have given an example :).

For example right not I am building an app the relies on API calls to a service and I am “refactoring” the microflows responsible for the REST API calls. I am especially focusing on the error handling. I created microflows for the different kind of method calls supported: GET, POST, DELETE, etc..

Those different microflows might encounter trigger the same kind of errors at time and I would like to have all my messages (error messages or not) centralized in one place, so instead of writing an error message in my microflow, I can enter a reference to an item in my messages repository.

I could build an entity for this but I was hoping there would be something in Mendix already. The kind of functionality one would also use for multi-language support…



What you describe "standard error messages available in every module or even project", calls for a central Errorlog for storing and reading error messages. Especially useful for handling interface-errors.
There is no Errorlog-App at this moment, but there are great external packages like the ELK-stack. Way overboard for your question, you will do fine with setting up your own Errorlog module. Module, so you can export and import it to other projects, or even fancier: set it up as a service in your company.
There error log module should have:
- an entity for storing the messages, including an error-number, a message, DateTime stamp and every other detail you want to get stored like mac-address, module, application and so on.
- a service/microflow that can get called to store an error message. 
- a list of standard error messages, usually number and text.


Hey Seb,

I think I understand what you’re getting at, but I could be wrong. Are you wanting a standard error you can copy and paste into all the pop-up messages you display to the user so you aren’t having to re-type them out?

If that’s the case, I was in a similar boat. What I ended up doing is creating a ‘Resources’ folder in my ‘Integrations’ module, and put a constant there that was a generic error message (“We’re sorry, it appeared something went wrong. Please contact...”) that I could paste at the front of my log/show message microflow actions. Worked like a charm – kept all my error messages similar enough for them to be professional and I didn’t have to try and remember what I wrote for the last one.