API Error integration

Api errors allow for payload passing. ie. specialized error code to be
parsed by the frontend.