output errors as debug info in api, when display_errors is on