made errors caught by the API print backtrace when in debug mode