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

[Applab][Libraries] Catch openuri too long error and show message #39057

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Feb 15, 2021

We've gotten several reports in Zendesk about libraries failing to publish.
It looks like at least some of these issues are caused by the library being too long for the profanity checker. This results in and OpenURI::HTTPError(which also results in a honeybadger error)

We need to rethink how the profanity checking happens a little more broadly (see slack thread and jira ticket), but for now, we can just surface a better error for the user.

image

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@ajpal ajpal requested a review from a team February 15, 2021 22:45
@ajpal ajpal requested a review from a team as a code owner February 15, 2021 22:45
@@ -165,7 +166,14 @@ export default class LibraryPublisher extends React.Component {
libraryJson,
error => {
console.warn(`Error publishing library: ${error}`);
this.setState({publishState: PublishState.ERROR_PUBLISH});
if (
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.

what does this error object look like? could we match on a status code or something instead of matching the message string?

Copy link
Contributor Author

@ajpal ajpal Feb 17, 2021

Choose a reason for hiding this comment

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

Yeah, I thought about that too but it's not clear to me how to do this more cleanly. This is was we have at this point:
image
It comes from here

please let me know if you know a better way to do this!

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, right, i've run into this same thing before. i don't think there's a better way to handle this right now 😢 i added a tech debt ticket for us to discuss: https://codedotorg.atlassian.net/browse/STAR-1441

@ajpal ajpal merged commit c66224f into staging Feb 17, 2021
@ajpal ajpal deleted the feb15-library-too-long branch February 17, 2021 23:54
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.

None yet

2 participants