Giter Club home page Giter Club logo

Comments (6)

kvz avatar kvz commented on May 29, 2024

Related:

from tus-js-client.

Acconut avatar Acconut commented on May 29, 2024

That being said, the errors that that we bubbled up where quite cryptic, and I wonder if we could improve on that

I agree with you that the errors could have more explanation with them. However, we should keep in mind that these messages are not meant for end-users but instead for us developers. While they are cryptic, they contain important details which has helped us in many cases to debug the problem :)

Also, what improvement did you think about? More details and what may have caused this issue?

from tus-js-client.

kvz avatar kvz commented on May 29, 2024

I think tus-js-client should be able to bubble up the error, and then it's up to the developer wether they want to show it in the UI, or just log it to console.error, or some kind of error service. But imho it should be available.

As for errors on https://tus.io/demo.html, I think it makes sense to show 'the best/most detailed error we can possibly get' right in the UI, since it's used for debugging and by developers.

Also, what improvement did you think about? More details and what may have caused this issue?

Yes, basically it would be nice if, in the three cases mentioned (and perhaps by fixing that we catch more), we could see some more helpful pointers.

from tus-js-client.

kvz avatar kvz commented on May 29, 2024

Like, not sure if it's possible but it seems in this case, the error is availalbe in the browser, but not in the context of the request: the server does not reply. While the alert seems to be geared towards only passing back errors from the server(?)

from tus-js-client.

Acconut avatar Acconut commented on May 29, 2024

I think tus-js-client should be able to bubble up the error, and then it's up to the developer wether they want to show it in the UI, or just log it to console.error, or some kind of error service. But imho it should be available.

This is already the case. tus-js-client provides an error callback with details about the error and at that point it's up to the developer to decide how to react to them (update UI, log error etc.). The alert box is just a lazy implementation for tus.io, this is not part of tus-js-client. Or am I missing your point?

Like, not sure if it's possible but it seems in this case, the error is availalbe in the browser, but not in the context of the request: the server does not reply. While the alert seems to be geared towards only passing back errors from the server(?)

While the developer tools provide detailed information, in most cases it is impossible to find the reason why a request failed using JavaScript (don't ask me why they don't expose these details). For example, it could be caused by being offline, an invalid SSL setup or an invalid CORS setup, just to name a few. These cryptic error messages we show already contain as much information as is available to tus-js-client, so our hands are bound in that matter.

from tus-js-client.

Acconut avatar Acconut commented on May 29, 2024

Closing this issue due to inactivity. Feel free to leave a comment if you want to continue the discussion :)

from tus-js-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.