Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialization error does not print the field name #351

Open
danielgomezrico opened this issue Aug 31, 2022 · 0 comments
Open

Deserialization error does not print the field name #351

danielgomezrico opened this issue Aug 31, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@danielgomezrico
Copy link
Contributor

danielgomezrico commented Aug 31, 2022

Hi

If you have a field defined with a type and the response have a different type the error does not say on which field does the issue happened, that makes debugging this harder

Actual

Check the message type int' is not a subtype of type 'double' and the stacktrace:

E/flutter ( 6262): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: type int' is not a subtype of type 'double'
E/flutter ( 6262): #0      JsonConverter.decodeJson (package:chopper/src/interceptor.dart:226:46)
E/flutter ( 6262): #1      JsonConverter.convertResponse (package:chopper/src/interceptor.dart:231:12)
E/flutter ( 6262): #2      ChopperClient._decodeResponse (package:chopper/src/base.dart:165:29)
E/flutter ( 6262): #3      ChopperClient._handleSuccessResponse (package:chopper/src/base.dart:247:17)
E/flutter ( 6262): #4      ChopperClient.send (package:chopper/src/base.dart:300:19)

Expected

on field 'xxxx' the type 'int' is not a subtype of type 'double' in type cast

@techouse techouse added the investigation The issue needs further investigation label Feb 18, 2023
@techouse techouse added enhancement New feature or request help wanted Extra attention is needed and removed investigation The issue needs further investigation labels Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants