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

Error in custom converters #173

Open
andreas-aeschlimann opened this issue Nov 12, 2021 · 0 comments
Open

Error in custom converters #173

andreas-aeschlimann opened this issue Nov 12, 2021 · 0 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@andreas-aeschlimann
Copy link
Member

When I define an own CustomConverter (example: DateConverter), I can define it to throw errors.

The error message is a bit confusing. The expected type is listed as undefined while it should better be the DateConverter instead (or none at all).

Example:

start.page.ts:78 Error: Fatal error in JsonConvert. Failed to map the JSON object to the class "User" because of a type error.

	Class property: 
		created

	Expected type: 
		undefined

	JSON property: 
		createdo

	JSON type: 
		undefined

	JSON value: 
		undefined

Unexpected type for DateTime string given. Expected string, received undefined.
@andreas-aeschlimann andreas-aeschlimann added the invalid This doesn't seem right label Nov 12, 2021
@andreas-aeschlimann andreas-aeschlimann self-assigned this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant