Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Broken Message refactor

Open
#610 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start in transcribe.js by locating the repeated try...catch blocks around project data parsing, using the KEY example in the issue as an entry point. Compare the existing error handling across keys and verify that the refactor preserves the loading timeout, error message, image change, and return behavior.

Written by the indexing model from the issue text.

Description

enhancement

transcribe.js has at least one place where the try... catch is repeated over and over instead of just going up a level.

Here's an example of this pattern:

if (data.KEY) {
        try {
            tpen.project.KEY= JSON.parse(data.KEY);
        } catch (e) {
            clearTimeout(longLoadingProject);
            $(".turnMsg").html("Sorry! We had trouble fetching this project.  Refresh the page to try again.");
            $(".transLoader").find("img").attr("src", "../TPEN/images/BrokenBook01.jpg");
            return false;
        }
    }

The try can definitely be pushed out one level or this can be a map on the keys, unless I am missing a bit.

Dominant language
Java
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CenterForDigitalHumanities/TPEN28

All issues in CenterForDigitalHumanities/TPEN28

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.