Skip to content

Commit

Permalink
Merge pull request #785 from jetstreamapp/bug/783
Browse files Browse the repository at this point in the history
Ensure invalid queries are properly handled for restore
  • Loading branch information
paustint committed Mar 21, 2024
2 parents 0591240 + 5f56226 commit 7c4a3a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const useQueryRestore = (
} else {
logger.warn('[QUERY RESTORE][ERROR]', ex);
setErrorMessage('An unknown error has ocurred while restoring your query');
rollbar.error(ex.message, { ex, query: currSoql });
rollbar.error('Query Restore Error', { message: ex.message, stack: ex.stack, query: currSoql });
}
endRestore(true, toolingOverride ?? isTooling);
}
Expand Down
2 changes: 2 additions & 0 deletions libs/shared/ui-utils/src/lib/shared-ui-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ export function convertFiltersToWhereClause<T extends WhereClause | HavingClause
}

export function getOperatorFromWhereClause(operator: Operator, value: string, hasNegation = false): QueryFilterOperator {
// Some invalid queries have value as an array
value = !value || typeof value !== 'string' ? '' : value;
operator = (operator?.toUpperCase() as Operator) || operator;
switch (operator) {
case '=':
Expand Down

0 comments on commit 7c4a3a4

Please sign in to comment.