<div dir="ltr">Hey guys,<div><br></div><div>I was looking into AGPUSH-720 and I got an perception that not all error response do we actually know on the client-side.</div><div><br></div><div>We should establish a common pattern - contract between server and client - which says how is a failure message transported from server to client, e.g.:</div>

<div><br></div><div>- response header</div><div>- response message body /w given structure</div><div><br></div><div><br></div><div>Right now, I&#39;ve opened a PR for a generic failure handling mechanism that can catch and report any error:</div>

<div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/pull/226/files">https://github.com/aerogear/aerogear-unifiedpush-server/pull/226/files</a><br></div><div><br></div><div>I plan to extend this error handling code dynamically as needed based on response codes (e.g. 404=Request resource is missing) and contract mentioned above ^.</div>

<div><br></div><div>Wdyt?</div><div><br></div><div><br></div><div>~ Lukas</div></div>