Pass in the Error Code from the Database

It's a good idea to pass in the error code as well since we're using the generic `Exception` class. This way, in our code, we can distinguish what kind of error we're dealing with, rather than having to guess from the error message or even try to parse the error code from it.