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

added check for type field on attribute #60

Conversation

JoshPJackson
Copy link

Added error exception giving a bit more detail on which field is missing the type declaration. The current error message detailed here (#57 (comment)) makes is very hard to debug

@jarrodparkes
Copy link
Collaborator

related to #61

@jarrodparkes
Copy link
Collaborator

@JoshPJackson can you remember when you were getting errors that caused you to want to make this change? I'm about to make a similar change in #59 but instead of throwing an error, I was going to safely break over objects that don't have a type defined since we just want those key/properties to map to their given schema (leave it unchanged)

@jarrodparkes
Copy link
Collaborator

See here:

// Before we check recursive cases, make sure this object defines a "type".
if (! isset($attributes->type)) {
break;
}

@JoshPJackson
Copy link
Author

@jarrodparkes sorry for the late reply. I can't remember exactly, I just remember it took me a long time to work out where the error was coming from. It think it is worth adding some form of message or something so the user knows that is has been skipped

@jarrodparkes
Copy link
Collaborator

@JoshPJackson this should be closed by #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants