# Interpreting Error Messages

__*SQLSTATE*__
__*ErrorCode*__

+ If a connection or statement fails, `TiDB` produces error messages
+ Error messages have three parts
  + A `TiDB` specific `ERROR CODE`
  + A `SQLSTATE` error code defined by SQL standards
    + Not all `TiDB` error numbers have corresponding `SQLSTATE` codes. In this case, `TiDB` uses `HY000` which means the general error
  + A text `MESSAGE` that describes the problem

--------------------------------------------------------------
[no notes]