Improve error messages when loading .riv files

Open
#296 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, wasm
Domain
web-dev

Research direction

Start at the web runtime's .riv file loading and parsing entry point, then reproduce the incorrect-path case described in the issue. Trace how the server's 404 text or HTML becomes the current Bad header and Problem loading file: may be corrupt errors. Done means an invalid or missing .riv path produces a descriptive error that helps users identify the failed request.

Written by the indexing model from the issue text.

Description

If an incorrect path is provided to a .riv file, we return an errors stating: Bad header and Problem loading file: may be corrupt. This is caused by the runtime trying to parse the response from the server that is not a .riv file, probably some sort of text or html along with the 404 status code.

A large amount of issues raised on our web runtimes are related to this issue, as it causes confusion for our users.

We should give more meaningful, descriptive errors here to help our users debug their problems

Dominant language
TypeScript
Stars
968
Forks
85
Avg merge
15h 1m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

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 rive-app/rive-wasm

All issues in rive-app/rive-wasm

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.