Skip to content

Conversation

@joe-yeager
Copy link
Contributor

Description and Context

Log the error message in the event that the polling returns a failure after the begin migration

@joe-yeager joe-yeager marked this pull request as ready for review April 25, 2025 21:50
SpinniesManager.fail('beginningMigration', {
text: lib.migrate.spinners.unableToStartMigration,
});
if (isMigrationStatus(error) && error.status === MIGRATION_STATUS.FAILURE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but we do have isSpecifiedError in LDL that you could use here (doesn't buy you a ton tbh, outside of maybe consistency in util usage)

Copy link
Contributor Author

@joe-yeager joe-yeager Apr 25, 2025

Choose a reason for hiding this comment

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

Good question. These aren't actually Error objects, our polling util rejects with plain objects that look like:

{
   status: "FAILURE" | "SOME_OTHER_STATUS"
   ... other fields
}

Wheres isSpecifiedError only operates on HubSpotHttpErrors

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

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

👌

@joe-yeager joe-yeager merged commit e3e7390 into main Apr 25, 2025
1 check passed
@joe-yeager joe-yeager deleted the jy/add-error-messages-beginning-migration-failed branch April 25, 2025 22:09
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