Fix server error handling

Fixes libattachsql/libattachsql#5