End user error messages

Jowo 2 years ago

Is it possible to change the error messages for end users?

For example if user enters a deviceID already in the system it will spit out:

Unique index or primary key violation: "PUBLIC.CONSTRAINT_A_INDEX_6 ON PUBLIC.TC_DEVICES(UNIQUEID NULLS FIRST) VALUES ( /* 1 */ '123456' )"; SQL statement: INSERT INTO tc_devices(calendarId, uniqueId, phone, model, contact, category, disabled, expirationTime, name, groupId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-224] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < BaseObjectResource:73 < ...)

This makes no sense for a non-technical end user.

It should be something like "DeviceID already taken. Please choose another one." or something similar.

There are a couple of these errors I would like to hide or change. Same problem when the session token runs out you get a Security exception.

Anton Tananaev 2 years ago

Yes, you should be able to change it in the code.

Jowo 2 years ago

Does that mean forking the entire project?

Anton Tananaev 2 years ago

If you want to contribute back, it's also fine.