On Saturday, September 17, 2016 at 2:01:54 AM UTC+1, Erik Lott wrote:
> No, our pages make their own HTTP requests from within the page, and do
> not delegate the top layer to make requests. The majority of our api
> requests are done from within pages, and I think that's likely the case for
> most apps. Each of our "pages" manage their own http errors through the use
> of a reusable view module that displays errors in a popup modal. We COULD
> pass 401 errors upwards to the top layer to initiate a re-route to login,
> but we don't - If a 401 hasn't been caught during the initial transition to
> a page, it's unlikely that one is going to occur during the lifetime of a
> single page. If a 401 does occur during a page api request, it's simple to
> display a "please login" message in the popup error modal.
> If you absolutely need to communicate all 401's upwards, just make that
> part of the API of your page modules - that will involve sending an
> 'OutMsg' from your page's "update" function.
Thanks. Never heard of OutMsg until now...
Basically achieves the same thing that I did with ports, but without the
need to resort to ports.
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.