Coder Social home page Coder Social logo

Error handling for dukcs/fetch about tanto HOT 8 CLOSED

skovhus avatar skovhus commented on June 12, 2024
Error handling for dukcs/fetch

from tanto.

Comments (8)

kkateq avatar kkateq commented on June 12, 2024 1

@skovhus Corrected above. Might be another issue.

from tanto.

skovhus avatar skovhus commented on June 12, 2024 1

Same problem with REQUEST_ERROR and CLEAR_ERROR. I'll fix and add a test.

from tanto.

kkateq avatar kkateq commented on June 12, 2024

Corrected. I saw issue with PR, that unstable( not sure that this is it) though. There some section in metadata that tries to render PR metadata info from store that still in fetching progress, if fetch is fast enough - it renders perfectly ;) I am working on this issue by splitting pull request query on few several ones and make each different parts of PR layout to be queried separately(as well as files list) as part of querying files file by file. So that user shouldn't wait until the whole PR fetched to see metadata for example.

from tanto.

skovhus avatar skovhus commented on June 12, 2024

Hm. Then it is also about failing request. The pull request query fails, but no error is propagated to the UI (i.e. error is empty, hence we show the 404 screen on error).

screen shot 2017-01-16 at 12 21 50

So the error is never set on the state, but the success reducer SET_REPOSITORY is running instead.

from tanto.

skovhus avatar skovhus commented on June 12, 2024

@kkateq Can you describe how you imagined error handling working for fetchActionCreator?

We currently just pass in one callback... Either the callback should take two arguments (node style with data and error) or we need another mechanisms for errors. Or maybe I'm missing something. :)

from tanto.

kkateq avatar kkateq commented on June 12, 2024

Nothing to do with SET_REPOSITORY here it was called before when you browsed the project. When you open PR SET_PULL_REQUEST should be called, if the request is successful, as I can see it's not.

fetchActionCreator wraps action and handle any query isFetching progress and error separately by fetch reducer where you can find a map and get error result by action name. That gives us the advantage to track fetch status and errors separately for any PullRequest partial data query outside pullrequests reducer (where otherwise we would have only one field for error and isFetching which would block partial rendering of PR layout until all the pull request queries finish). Check out ducks/fetch reducer.

from tanto.

kkateq avatar kkateq commented on June 12, 2024

And in the case of exception inside callback, it should be caught inside fetch saga and appear and be processed by fetch reducer.

from tanto.

skovhus avatar skovhus commented on June 12, 2024

I've tracked the bug down.

https://github.com/Unity-Technologies/Tanto/blob/master/src/client/ducks/fetch/index.js#L31

SENDING_REQUEST wrongly replaces the error object.

from tanto.

Related Issues (5)

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.