Fix server error handling

Fixes libattachsql/libattachsql#5
Merge pull request #17 from LinuxJedi/server_errors

Fix server error handling