mfloto / tmn

Get notified on discord about resale tickets on ticketmaster 🚧 Currently blocked by Ticketmaster 🚧
21 stars 3 forks source link

Error decoding response body: invalid type #4

Open GAsplund opened 1 year ago

GAsplund commented 1 year ago

It seems that some change in the API has turned listingId into a string rather than a uint32. Log:

Error: 
   0: Unable to get resale offers
   1: error decoding response body: invalid type: string "34106689", expected u32 at line 1 column 2852
   2: invalid type: string "34106689", expected u32 at line 1 column 2852
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 3 frames hidden ⋮                               
   4: tokio::runtime::park::CachedParkThread::block_on::hd8fcd8f4eae8be3b
      at <unknown source file>:<unknown line>
   5: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::ha27a15180af81618
      at <unknown source file>:<unknown line>
   6: tokio::runtime::runtime::Runtime::block_on::h36ba000d1ec4358f
      at <unknown source file>:<unknown line>
   7: ticketmaster_notifier::main::ha2d72f6a4b727e66
      at <unknown source file>:<unknown line>
   8: std::sys_common::backtrace::__rust_begin_short_backtrace::h50082b8b01c3958d
      at <unknown source file>:<unknown line>
   9: std::rt::lang_start::{{closure}}::h1e5eddf9c98b8a0a
      at <unknown source file>:<unknown line>
  10: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hf844a4f99dae8a02
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287
  11: std::panicking::try::do_call::h63be2492f536982b
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
  12: std::panicking::try::hd13fe45e524718fb
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
  13: std::panic::catch_unwind::h7fe756d3425dcb5e
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
  14: std::rt::lang_start_internal::{{closure}}::h426d064fc510ca4c
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
  15: std::panicking::try::do_call::hcca9ea047ee58664
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
  16: std::panicking::try::hc443177363be5679
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
  17: std::panic::catch_unwind::h8cff8fafd1cdc44a
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
  18: std::rt::lang_start_internal::h10c88a09b6297efe
      at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
  19: main<unknown>
      at <unknown source file>:<unknown line>

URL: https://availability.ticketmaster.eu/api/v2/TM_SE/resale/624095 Relevant JSON snippet:

{
   "id":"KJ6DGNBRGA3DMOBZ",
   "listingId":"34106689",
   "limit":{
      "max":1,
      "min":1,
      "multiple":1
   },
   "price":{
      "total":131625,
      "original":117000,
      "commission":14625
   },
   "sellerInformation":{
      "businessType":"private",
      "affiliationType":"unaffiliated"
   },
   "restrictions":[
      "Ståplats"
   ],
   "quantities":[
      1
   ],
   "type":"resale"
}
mfloto commented 1 year ago

Hey @GAsplund, Thanks for reporting the API change. You are correct, listingId is now a string. This also applies to TM_DE. If you want, you can make a PR for this, but since there has been another change in the way the API is called, and I don't have a lot of time at the moment, it will probably take a while before I can approve it.