Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkReply unknown error
Forum Updated to NodeBB v4.3 + New Features

QNetworkReply unknown error

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kayote
    wrote on last edited by
    #1

    If you get a QNetworkReply::UnknownServerError from a reply on a http request, what could it be? All it says in the Qt doc is "an unknown error related to the server response was detected" but this doesn't normally happen, only for single users and based on this I am not able to figure out what the cause could be

    JonBJ Pablo J. RoginaP 2 Replies Last reply
    0
    • K Kayote

      If you get a QNetworkReply::UnknownServerError from a reply on a http request, what could it be? All it says in the Qt doc is "an unknown error related to the server response was detected" but this doesn't normally happen, only for single users and based on this I am not able to figure out what the cause could be

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Kayote said in QNetworkReply unknown error:

      QNetworkReply::UnknownServerError

      (Depending on your Qt version, which you do not mention) from https://code.woboq.org/qt5/qtbase/src/network/access/qhttpthreaddelegate.cpp.html the server is returning a 500+ code which is not one of the more usual 500, 501 or 503. You will probably have to look at what is going on server-side to get a better idea, unless you can spot something odd in the client request.

      1 Reply Last reply
      3
      • K Kayote

        If you get a QNetworkReply::UnknownServerError from a reply on a http request, what could it be? All it says in the Qt doc is "an unknown error related to the server response was detected" but this doesn't normally happen, only for single users and based on this I am not able to figure out what the cause could be

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by Pablo J. Rogina
        #3

        @Kayote from same source code @JonB mentioned, you'll see that the string error you've got is the return value of method statusCodeFromHttp(httpReply->statusCode(), httpRequest.url()) so httpReply->statusCode() provides the actual numeric value >500 that the server sends.

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved