question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API returns `424 Failed dependency`

See original GitHub issue
          To me the error now is `424 Failed dependency`
Version: 0.4.0.0
Using token credential: ChainedTokenCredential to fetch a token.
Token retrieved and expires at: 18/04/2023 16:02:25 +00:00
Retrieving data from 
/subscriptions/[subId]/providers/Microsoft.CostManagement/query?api-versio
n=2021-10-01&$top=5000 using the following payload:
{
   "type": "ActualCost",
   "timeframe": "BillingMonthToDate",
   "timePeriod": null,
   "dataSet": {
      "granularity": "Daily",
      "aggregation": {
         "totalCost": {
            "name": "Cost",
            "function": "Sum"
         },
         "totalCostUSD": {
            "name": "CostUSD",
            "function": "Sum"
         }
      },
      "sorting": [
         {
            "direction": "Ascending",
            "name": "UsageDate"
         }
      ]
   }
}
Response status code is OK and got payload size of 455
Retrieving data from 
/subscriptions/[subId]/providers/Microsoft.CostManagement/forecast?api-ver
sion=2021-10-01&$top=5000 using the following payload:
{
   "type": "ActualCost",
   "timeframe": "Custom",
   "timePeriod": {
      "from": "2023-04-18",
      "to": "2023-05-02"
   },
   "dataSet": {
      "granularity": "Daily",
      "aggregation": {
         "totalCost": {
            "name": "Cost",
            "function": "Sum"
         }
      },
      "sorting": [
         {
            "direction": "ascending",
            "name": "UsageDate"
         }
      ]
   }
}
Response status code is FailedDependency and got payload size of 97
Response content: {"error":{"code":"FailedDependency","message":"Can't do forecast - cost training data
is empty"}}

Hi @mivano! I didn’t understand if this kind of error is going to be solved or if is it impossible to make ti work with my kind of subscription because of API design. Thanks!

_Originally posted by @FrancescoBonizzi in https://github.com/mivano/azure-cost-cli/issues/6#issuecomment-1513274282_

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mivanocommented, Jul 9, 2023

Hopefully, MS will move more types to the new cost API soon. Unfortunately, the previous error obscured that it simply did not had any data.

0reactions
FrancescoBonizzicommented, Jul 9, 2023

The good news is that when we will finish the sponsorship bonus, we will go back with a normal subscription so I will be able to use your wonderful tool. 🤣

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Status 424 or 500 for error on external dependency
424: Method Failure - Indicates the method was not executed on a particular resource within its scope because some part of the method's ......
Read more >
424 Failed Dependency - HTTP status code explained
HTTP response status code 424 Failed Dependency is a client error that is returned by the server as part of a 207 Multi-Status...
Read more >
424 Failed Dependency - HTTP Status Code Glossary
A 424 status code occurs when the client makes a request to the server, but the request fails because it relies on a...
Read more >
What is HTTP Status Code 424 (Failed Dependency)?
The HTTP Status Code 424 means that the client's request failed because it depended on another request that had previously failed.
Read more >
424 FAILED DEPENDENCY HTTP Status Code
424 FAILED DEPENDENCY. The method could not be performed on the resource because the requested action depended on another action and that action...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found