Move REST exceptions to common package

Allows their use in gutterball resources.