Second error check in SQL API