AO3-7568 Fix Error 500 when importing a work with a numeric date - #5983
Open
hab-bang wants to merge 1 commit into
Open
AO3-7568 Fix Error 500 when importing a work with a numeric date#5983hab-bang wants to merge 1 commit into
hab-bang wants to merge 1 commit into
Conversation
hab-bang
force-pushed
the
AO3-7568-error-500-importing-work-with-numeric-date
branch
from
August 17, 2026 01:58
851f990 to
5c0d73a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
AO3-1234 Fix thing)Issue
https://otwarchive.atlassian.net/browse/AO3-7568
Purpose
Fixing the misspelled constant in
StoryParser#convert_revised_atthat returns an Error 500 when a work's date is a plain number.The method treats an all-digit date as seconds since the epoch. That branch calls
Regex.last_match, but the class isRegexp, so it raisesuninitialized constant StoryParser::Regex. The method only rescuesArgumentErrorandTypeError, so the error escapes the import and the user gets a 500.Testing Instructions
Follow the reproduction steps on the Jira issue (Post > Import Work with the gist URL from the ticket, and any language):
NameError: uninitialized constant StoryParser::Regex).The date shows as 1970-01-04, because the parser reads an all-numeric date as a Unix timestamp. That is existing behaviour and is not changed here, so it is expected.
Full testing instructions are also on the Jira ticket.
References
Reported from Sentry, issue
AO3-STAGING-8Y.Credit
Name: hayoung
Pronouns: she/her