Implemented on-page error reporting
 * Fixed potential `ClassCastException` issue caused when adding errors.
 * Don't cache resources with errors