If you want to show only one error;
note: I wouldn't recommend this option, it removes a lot of important information.
Show the first error the app encounters. That way users can chronologically try to fix things. It also prevents showing dependent errors. For example: you need a http connection to load an element, but you don't have an http connection, so you get an error for the connection, and an error for the element. Fix the connection, and the second error is also gone.
If you want to show multiple errors:
There are several ways to show this;
- show each individual error
- show one error of each type
The simplest way is to just throw out every error as it appears. If you're worried about duplicate notifications, specify the element which throws the error. If you're displaying a facebook feed and a twitter feed, and only one of them throws an error, the user might not care because they're not even using that element of the site. As an added benefit, it will make bugfixing easier because you get more detailed feedback about WHAT is broken instead of just knowing SOMETHING is broken.
But if you want to save a bit more screen space and/or be more organized, you can collate errors in something like an array? You could use a simple counter or be more specific and name each element. Example:
(2) Errors of SpecificErrorType:
-FirstElementWithError -SecondElementWithError
(1) Errors of AnotherErrorType:
-FirstElementWithError
Or the inverse:
(2) Errors in FirstElementWithError:
-SpecificErrorType - AnotherErrorType
(1) Errors in SecondElementWithError:
-SpecificErrorType
This also gives some insight into prioritization. For example throw all the counters into a incrementing database and blammo you have a list of most-common errors or error locations.