Uploaded image for project: 'Qt Cloud'
  1. Qt Cloud
  2. CLOUD-561

Use standard HTTPException instead of hacking into JSONresponse.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • None
    • Backend
    • None

      For example: 

       

      this_api_response = Tools.createResponseOBJ(201, json_content=on_success_json)
                          else:
                              this_api_response = Tools.createResponseOBJ(400, {"status": "Failed", "message": "Cannot create user"})
       

       

       

      can be replaced with: 

      raise HTTPException(status_code=400, detail="Cannot create user") # or provide dict in `detail` and it would be JSONed automatically
       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            as33ms Aseem Shakuntal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes