Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-9931

Build info without the started date produces an unhelpful error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.4.2, 4.5.2, 4.7.4
    • Fix Version/s: 4.8.1
    • Component/s: Build Info, REST API
    • Labels:
      None

      Description

      If build info is submitted without the started property, it will produce an unhelpful error:

        "errors" : [ {
          "status" : 500,
          "message" : "An unexpected error has occurred, please check Artifactory logs for further details."
        } ]
      

      The other required fields (name and number) will produce a helpful error:

        "errors" : [ {
          "status" : 500,
          "message" : "Build name, number and date cannot be empty or null!"
        } ]
      

      The same should occur for the started property. Also note there is no date property so the message needs to be updated.

      To reproduce

      1. Use curl to submit a build.json without the started property (see below)

      • curl -u $ARTIFACTORY_USER_ACCESS -X PUT $ARTIFACTORY_URL/api/build -H "Content-Type: application/json" --upload-file build.json 

      2. Observe the error

      build.json

      {
        "version" : "1.0",
        "name" : "MyBuild",
        "number" : "1",
        "agent" : {
          "name" : "N/A"
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              alexeiv Alexei Vainshtein
              Reporter:
              arturoa Arturo Aparicio
              Assigned QA:
              Mor Iluz (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: