challenge-api icon indicating copy to clipboard operation
challenge-api copied to clipboard

Missing billing account causes the legacy challenge activation to fail

Open ThomasKranitsas opened this issue 5 years ago • 2 comments
trafficstars

When activating a legacy challenge the legacy processor throws 500 error because of missing billing account (Billing/PO Number is null/empty.)

As a temporary solution, the V5 Challenge API will call the https://api.topcoder.com/v3/direct/projects/<directProjectId> endpoint to fetch the billing account for the given project ID.

If the billing account does not exist, it'll not let you set the status to Active as the activation won't be possible on the legacy system.

Implications:

  1. We can’t create an Active challenge. We need to create it as Draft and then update it so the legacy processor populates the directProjectId
  2. We can’t update to Active unless the processor has created the challenge on legacy first
  3. if either the billing account or the directProjectId is missing, The API will throw a 400 error

cc @rootelement

ThomasKranitsas avatar Jun 09 '20 18:06 ThomasKranitsas

Legacy processor PR: https://github.com/topcoder-platform/legacy-challenge-processor/pull/12 V5 API PR: https://github.com/topcoder-platform/challenge-api/pull/159

ThomasKranitsas avatar Jun 09 '20 18:06 ThomasKranitsas

@ThomasKranitsas Is this still true? We're using v5 projects for BA info, we don't allow activation if it's not set, and the LCP should be reading the BA from the payload/api?

rootelement avatar Apr 29 '21 15:04 rootelement