Error Codes
If a database request fails for any reason, RdbHost tries to display an error page in XML or JSON to tell the client what went wrong. This error page contains a DB API Exception Class name, an error code, and a one-line message.
The error page format is documented on the result-formats page.
Warning
Exception raised for important warnings like data truncations while inserting, etc.
RdbHost does not issue any Warning Errors, so any Warnings you see will come from PostgreSQL and will have PostgreSQL error codes and messages.
InterfaceError
Exception raised for errors related to the database interface rather than the database itself.
Some InterfaceErrors you see may come from Psycopg2, but the following conditions are reported by RdbHost itself via InterfaceErrors.
| rdb02 | Account exceeded usage limit. |
| rdb04 | Account Name not provided in URL. |
| rdb05 | Query parameter (q) not provided. |
| rdb06 | Authcodes not permitted in GET requests. |
| rdb11 | Too many failed authentications. |
| rdb12 | Bad request parameter value. |
| rdbxml | Various XML encoding or decoding Errors. Will have error message from XML library. |
| rdbVE | ValueErrors in rdbhost internals. |
DatabaseError
Exception raised for errors related to the database.
Most DatabaseErrors you see will come from PostgreSQL, but the following condition is reported by RdbHost itself via a DatabaseError.
| rdb03 | Query time limit was exceeded. |
DataError
Exception raised for errors stemming from problems with the processed data, for example division by zero, numeric value out of range, etc.
RdbHost does not issue any DataErrors, so any that you see will come from PostgreSQL and will have PostgreSQL error codes and messages.
OperationalError
Exception raised for errors related to the database's operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc.
RdbHost does not issue any OperationalErrors, so any that you see will come from PostgreSQL and will have PostgreSQL error codes and messages.
IntegrityError
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.
Rdbhost does not issue any IntegrityErrors, so any that you see will come from PostgreSQL and will have PostgreSQL error codes and messages.
InternalError
Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync, etc.
RdbHost does not issue any InternalErrors, so any that you see will come from PostgreSQL and will have PostgreSQL error codes and messages.
ProgrammingError
Exception raised for programming errors, e.g. table not found or already exists, syntax error in the SQL statement, wrong number of parameters specified, etc.
Most ProgrammingErrors you see will come from PostgreSQL, but one error is reported by RdbHost itself via ProgrammingError.
| rdb09 | Comment Syntax Error. Typically, comment or quote was not closed. |
NotSupportedError
Exception raised in case a method or database API was used that is not supported by the database, e.g. requesting a rollback() on a connection that does not support transactions or has transactions turned off.
Most NotSupportedErrors you see will come from PostgreSQL or Psycopg2, but one type of error is reported by RdbHost itself via a NotSupportedError.
| rdb07 | RETURNING clause of SQL is not supported.. |