Factor out invalid responses into a client error helper and return JSON formatted errors for consistency with success responses.
Factor out invalid responses into a client error helper and return JSON formatted errors for consistency with success responses.

praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go