I am attempting to develop a browser extension which will increase the resilience of chromium-based browsers when confronted with error conditions.
Is it possible to obtain a list of all possible errors that chromium-based browsers could encounter, and the values that chrome.webRequest.onErrorOccurred is triggered by*?
I also note that the documentation says that since the error codes are subject to change, they should not be used for processing. Given that my extension is predicated upon changing how the browser reacts to some error conditions, what are the alternatives to passing these strings?
These errors are an implementation detail. If you really want to learn more about the error codes and when they're set, read Chromium's source code (in C++).
All possible network errors are declared in net/base/net_error_list.h, using the following macro:
#define NET_ERROR(label, value) ERR_ ## label = value,
#include "net/base/net_error_list.h"
#undef NET_ERROR
Only a subset of this list of NET_ERRORs will be visible in the webRequest API. If you really want to know which errors are going to be triggered, then you have to follow all code paths in the source code (the source browser at http://cs.chromium.org is very helpful). And since these are implementation details, they can be changed at any point in the future.
These errors are not guaranteed to be stable and consistent in the future, but you have to use them given the lack of alternatives and the fact that the most common strings haven't changed for years.