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

Feature/ch80914/improve error messages while importing #15893

Merged

Conversation

jgoizueta
Copy link
Contributor

See https://app.clubhouse.io/cartoteam/story/80914

This improves import error messages for connectors by extracting information from the logs in the case of generic (9999) errors.

@jgoizueta
Copy link
Contributor Author

For all connector errors, the information returned in the import status used to be:

{ // ...
  "get_error_text": {
    "title": "Unknown",
    "what_about": "Sorry, something went wrong and we're not sure what. Try\n      uploading your file again, or <a href='mailto:support@carto.com?subject=Unknown error'>contact us</a> and we'll try to help you quickly.",
    "source": "cartodb"
  }
}

Now it is more informative:

{ // ...
  get_error_text: {
    source: "cartodb"
    title: "Connector Error"
    what_about: "Executing ODBC query to get schema↵SQL compilation error:↵syntax error line 1 at position 0 unexpected 'OOPSIE'.↵↵"
  }
}

And it appears like this in the UI:

Screenshot 2020-10-15 at 19 18 43

@jgoizueta
Copy link
Contributor Author

Dear Rubocop:

  • You may not like the get_ in the get_error_text method, but it is part of our API, so I'm not going to change it, live with it.
  • Using underscores as thousands separators in numeric quantities improves legibility, but my 9999 is a code, not a numeric quantity, and I like it like that.

@jgoizueta jgoizueta merged commit e508464 into master Nov 3, 2020
@jgoizueta jgoizueta deleted the feature/ch80914/improve-error-messages-while-importing branch November 3, 2020 10:55
@thedae thedae mentioned this pull request Nov 6, 2020
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.

2 participants