observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.5k stars 120 forks source link

Improve CLI command error handling #482

Closed mcglincy closed 8 months ago

mcglincy commented 9 months ago

EA bug bash: https://observablehq.com/@observablehq/ea-bug-bash

We need dramatically better error handling around CLI deploy errors. At a minimum, we should be catching all unexpected http status errors and showing a more readable/actionable error message to users. (and no stacktraces :P)

See https://oclif.io/.

Fil commented 9 months ago

related: #523

mcglincy commented 9 months ago

@mythmon - are you doing any of this work as part of the deploy+clack re-tooling you're doing? Or should I revisit this issue once your changes are in place?

mythmon commented 9 months ago

Let's re-evaluate this after my changes are in place.

cinxmo commented 9 months ago

We can have a series of pre-deploy checks on top of error handling. I can think of:

mythmon commented 9 months ago

Regarding file size limits: we still have a hard limit of 50MB, because after that our HTTP server closes the connection. I don't think it is a high priority to raise that limit, because as Ambassador Yuri said recently regarding that limit: if you're putting files bigger than 50MB in a project, you're making a bad user experience and should think twice about it.

tophtucker commented 8 months ago

michael's https://github.com/observablehq/framework/pull/725 adds some plumbing to improve this in general, and resolves the TOO_MANY_PROJECTS case

mbostock commented 8 months ago

@mythmon @mcglincy @cinxmo What’s the latest on this? This is one of the last outstanding issues for GA and I’m happy to chip in to help with the error-handling if needed.

cinxmo commented 8 months ago

@mbostock I put up a PR to handle a few more cases but wanted to avoid larger changes. If you start working on it, I'd be happy to pair

mbostock commented 8 months ago

Fixed in #768 @mythmon?

mythmon commented 8 months ago

Yes, that gets us to a good place for launch. I think we'll still need to catch individual places where we could have improved error handling, but we can handle that in individual issues.