adds basic error handling to API