Connect API errors

Each error response names one of these pages in its type field. Branch on code.