json errors for api