Cfcatch change from 5.2.9.31 to 5.3.1.102

We noticed a change in the data coming back in our cfcatch objects after a recent update. It took a while to track down, so I thought I’d post about it in case anybody else runs into it.

In 5.2.9.31, our code was using cfcatch.detail to check for a specific error and handle it.

After an upgrade to 5.3.1.102, we started getting our default error emails for this particular error. After digging into the cause, I noticed that cfcatch.detail was now empty, and the string we were looking for was in cfcatch.message instead.

I couldn’t find anywhere that this was documented.

1 Like

Does it happen with the latest Snapshot?

I just checked 5.3.2.77 and 5.3.4.23-SNAPSHOT and the text was in cfcatch.message.

The change appears to have happened some time after 5.2.9.31 but I haven’t had a chance to dig through change sets to track it down.

It may even be intentional, which is fine. I just wanted to make a post about it in case anybody in the future is searching for a similar issue. :slight_smile:

Which specific error?

We did remove some paths from error messages, moving them to the detail, so that showing just the error message didn’t expose full paths to end users

This particular error was a database error around inserting something that violated a unique index constraint. “Cannot insert duplicate key row in object ‘blah’…” (NativeErrorCode - 2601, if that helps.)

So, which database, which db extension version number(s), before and after error messages?

We’re on MS SQL and it was using the 6.0.7728.100 version driver.

I didn’t test other versions of the driver, but I can if that would be useful.

and the different error messages?

I’m not sure what you mean by different error messages.

The message was the same, it just was in a different spot inside of the cfcatch structure.

As far as I know the SQL driver is 6.0.7728.100 in all instances.

On Lucee 5.2.9.31 it was in cfcatch.detail.
On Lucee 5.3.1.102 it was in cfcatch.message.

If that’s the info you’re after, let me know.

ah gotcha, sorry… what was in the message in 5.2.9.31?

The error text on both was “Cannot insert duplicate key row in object ‘dbo.blah’”. The NativeErrorCode was 2601 on both as well.

Thank you for the heads up. I’ve found a quite a few undocumented changes on the upgrade from 5.2 to 5.3 (See my post on the return value of array.delete()) So this is good to know. I have noticed in the past the cfcatch objects for SQL database errors often have an empty “message” but the actual error in the “detail” - I always thought it was a quirk of the driver.