Bug report: /budgets/last-used/settings errors with resource_not_found

Most endpoints support `last-used` as a budget ID, but `/budgets/<budget-id>/settings` doesn't seem to.  It works fine if I specify an actual budget ID.

Expected result:

$ curl -H "Authorization: Bearer REDACTED" https://api.youneedabudget.com/v1/budgets/last-used/settings
{"data":{"settings":{"date_format":{"format":"YYYY-MM-DD"},"currency_format":{"iso_code":"CAD","example_format":"123,456.78","decimal_digits":2,"decimal_separator":".","symbol_first":true,"group_separator":",","currency_symbol":"$","display_symbol":true}}}}

Actual result:

$ curl -H "Authorization: Bearer REDACTED" https://api.youneedabudget.com/v1/budgets/last-used/settings
{"error":{"id":"404.2","name":"resource_not_found","detail":"Resource not found"}}

Note that this does work:

$ curl -H "Authorization: Bearer REDACTED" https://api.youneedabudget.com/v1/budgets/deadbeef0fab2cd9-3a7f-8254-c925-92581bf3ca72/settings
{"data":{"settings":{"date_format":{"format":"YYYY-MM-DD"},"currency_format":{"iso_code":"CAD","example_format":"123,456.78","decimal_digits":2,"decimal_separator":".","symbol_first":true,"group_separator":",","currency_symbol":"$","display_symbol":true}}}}
3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • George
    • Developer
    • george_ynab
    • 6 mths ago
    • Reported - view

    I was able to repro the issue and am part way through the fix. I'm taking the time to get the other `'last-used'` endpoints under test so it'll take a bit. I'm aiming for getting the fix into next Tuesday's push. I'll post more here. Emanuel Borsboom

    Reply Like
    • George
    • Developer
    • george_ynab
    • 6 mths ago
    • Reported - view

    Emanuel Borsboom The fix for

    GET /budgets/last-used/settings

    has been deployed to production. It's now working as expected on my budget. Thanks for writing in!

    Reply Like
  • Thanks, and confirmed!  Now I can take that recommendation to set the budget ID out of the CLI-for-YNAB docs.

    Reply Like
Like Follow
  • 6 mths agoLast active
  • 3Replies
  • 346Views
  • 1 Following