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

Cody Ignore: Treat unterminated JSON responses as an outdated API error message #4024

Merged
merged 2 commits into from
May 2, 2024

Conversation

dominiccooney
Copy link
Contributor

This unbreaks 5.2.3 treating all files as ignored.

Test plan

Tested manually: Log in to 5.2.3 and chat with an @-file mention. You should not get a Cody Ignore error message.

@dominiccooney dominiccooney enabled auto-merge (squash) May 2, 2024 16:14
@@ -1029,5 +1029,11 @@ export type LogEventMode =
| 'all' // log to both dotcom AND the connected instance

function hasOutdatedAPIErrorMessages(error: Error): boolean {
return error.message.includes('Cannot query field')
// Sourcegraph 5.2.3 returns an empty string ("") instead of an error message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help to add the getSiteVersion() check to contextFilters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should fix this properly with something like that.

@dominiccooney dominiccooney merged commit 08ccb7d into main May 2, 2024
17 of 18 checks passed
@dominiccooney dominiccooney deleted the dpc/five-two-three branch May 2, 2024 16:17
dominiccooney added a commit to sourcegraph/jetbrains that referenced this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants