flutter-tdd-clean-architecture-course icon indicating copy to clipboard operation
flutter-tdd-clean-architecture-course copied to clipboard

infinity from random endpoint causes crash

Open rosstimothy opened this issue 6 years ago • 1 comments

Random can return infinity, which has a null value for the number field, see json response below

{
  "text": "-Infinity is negative infinity.",
  "number": null,
  "found": true,
  "type": "trivia"
}

rosstimothy avatar Oct 05 '19 03:10 rosstimothy

Oh, at this point, I think we can just pretend that this response doesn't occur since this is just an example app... 😅

Otherwise, you'd put appropriate logic into the InputConverter.

ResoDev avatar Oct 11 '19 20:10 ResoDev