adding error codes to all backend GAPI queries