Author Topic: MINOR BUG: Lazy loading dataModel > getData( response, textStatus)  (Read 374 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 131
    • View Profile
In dataModel > getData(response, textStatus, jqXHR), if there is a 404 or any other error, the function is not called and obviously "textStatus" is not set.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: MINOR BUG: Lazy loading dataModel > getData( response, textStatus)
« Reply #1 on: May 13, 2024, 11:18:50 pm »
dataModel.error is called whenever there is an error.

https://paramquery.com/pro/api#option-dataModel-error

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 131
    • View Profile
Re: MINOR BUG: Lazy loading dataModel > getData( response, textStatus)
« Reply #2 on: May 27, 2024, 02:41:30 am »
Understood, but my point is that textStatus will always be "success", so I'm not sure why it is used.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: MINOR BUG: Lazy loading dataModel > getData( response, textStatus)
« Reply #3 on: May 27, 2024, 10:54:04 pm »
dataModel.error is useful for error handling and textStatus = "error" in the callback.
« Last Edit: May 27, 2024, 11:01:37 pm by paramvir »