Fix condition of assertion when error: true is to be expected.
Implement error-logging of RestAqlHandler