Handle unknown errors as non-fatal

Make them fatal if they occur more than 500 times in a row.

Closes #33