When a query fails, I'm getting the error.code "BadRequestException" -- which is the same as the error.name. I think this is meant to be the database error code, so is likely a bug.
Ex: I have a unique index on a table. When an insert fails because of that constraint, I should get back error code 1062.
Now, I'm getting the error.message = "Database error code: 1062. Message: Duplicate entry 'company-1-c9be652b-9d1f-4261-9d97-1e1c10bb6de8' for key 'account_src"
So I'm going to need to parse that out of the message.
When a query fails, I'm getting the
error.code
"BadRequestException" -- which is the same as theerror.name
. I think this is meant to be the database error code, so is likely a bug.Ex: I have a unique index on a table. When an insert fails because of that constraint, I should get back error code 1062. Now, I'm getting the
error.message
= "Database error code: 1062. Message: Duplicate entry 'company-1-c9be652b-9d1f-4261-9d97-1e1c10bb6de8' for key 'account_src"So I'm going to need to parse that out of the message.