hooked up to persistence layer
handles server side errors