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

TypeError: u.avatar_urls is undefined #5

Closed
coreymckrill opened this issue Oct 22, 2021 · 1 comment · Fixed by #7
Closed

TypeError: u.avatar_urls is undefined #5

coreymckrill opened this issue Oct 22, 2021 · 1 comment · Fixed by #7

Comments

@coreymckrill
Copy link
Collaborator

Getting this error when attempting to add a new note on a pattern post in the Pattern Directory.

@ryelle
Copy link
Contributor

ryelle commented Oct 25, 2021

The issue here was that the author does not exist on the patterns site, so the value for author was actually an error:

{
	...
	"_embedded": {
		"author": [
			{
				"code": "rest_user_invalid_id",
				"message": "Invalid user ID.",
				"data": {
					"status": 404
				}
			}
		]
	}
}

A check for avatar_urls or whether author is an error around here should fix the issue.

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