Jump to content

rinomite

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by rinomite

  1. 10 minutes ago, Freschmeet said:

    Not sure if that's technically possible. Servers aren't so smart - if you're trying to login to some server, pretty much any server, and it isn't there (e.g. it isn't online), you just get an HTTP error. 

    It would be sweet if there was a server status page, though, which is certainly possible. 

    As a developer myself, you are incorrect sir. If you are trying to access an endpoint (say, /login for example) and you get back an error, you can investigate the error (using code, of course) to present a message that's usable to the user (proper UX). It would make these forums a lot less cluttered.  Something like...

     

    try {
       results = await request.post("/login", params);
       token = results.token;
       continue();
    } catch (HttpException ex) {
       if (ex.status == 500) {
          print("Server Unavailable");
       } else {
          print(ex.message);
       }
    }

     

×
×
  • Create New...