Aggregate built-in Get function throwing an error

In modifying an old, fairly complicated server action, a mistake was made that allowed an empty string to be passed to an Aggregate's built-in Get function, for an integer key. The error message revealed the physical database, schema, and table name ([OUTSYSTEMS].dbo.[OSUSR_xxxxxxx] with key 0 was not found"). I can't think of any situation where exposing that low-level information is appropriate. It should only be written to Service Center. Am I wrong?

Hi @Joseph Marlin,

Database Exceptions are raised by OutSystems when there is an error related to the database management system. This exception will show the detailed error when there is no proper exception handling.

As a developer, we should handle this through exception handling. You can refer to this success page to understand more.

Thanks, Aadhavan S

I get that, but database errors also give messages about possible truncation which you do want to pass on. Currently, I am looking for the word “truncate” in the exception message to decide whether to pass it on. In this case, it is for a bulk upload from Excel spreadsheets, so you can’t count on form validations, etc. Of course, SQL Server doesn’t even tell you which field has the issue, so you have to roll your own for that. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.