Added total errors and error categorization to API results.
Moved error handling to timing. Added check.
Show total errors and error codes.