Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to widgets when column is missing #427

Merged
Prev Previous commit
Next Next commit
Handle model api missing columns error
  • Loading branch information
Clebal committed Jun 13, 2022
commit f5b6c9b364b0b5894d081fe6b7de5af652afea36
4 changes: 4 additions & 0 deletions packages/react-api/src/api/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export function dealWithApiError({ response, data }) {
throw new InvalidColumnError(`${data.error} ${data.column_name}`);
}

if (data.error.includes('Missing columns')) {
throw new InvalidColumnError(data.error);
}

switch (response.status) {
case 401:
throw new Error('Unauthorized access. Invalid credentials');
Expand Down