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

Panic on instagram failure #3048

Closed
bep opened this issue Feb 17, 2017 · 3 comments · Fixed by #3049
Closed

Panic on instagram failure #3048

bep opened this issue Feb 17, 2017 · 3 comments · Fixed by #3049
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Feb 17, 2017

Wrong ID in short code etc. Should be handled more grafefully.

ERROR 2017/02/17 15:10:23 Retry #1 for https://api.instagram.com/oembed/?url=https://instagram.com/p/BN1pgzujlyP-/&hidecaption=0 and sleeping for 2s
panic: reflect: Zero(nil) [recovered]
	panic: reflect: Zero(nil)

goroutine 356 [running]:
panic(0x636960, 0xc422ff9460)
	/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x1a1
text/template.errRecover(0xc423e71830)
	/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:146 +0x18e
panic(0x636960, 0xc422ff9460)
	/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:458 +0x243
reflect.Zero(0x0, 0x0, 0x656440, 0xc42208f1e8, 0x94)
	/usr/local/Cellar/go/1.7.4/libexec/src/reflect/value.go:2104 +0x13d
text/template.(*state).validateType(0xc423e717b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:681 +0x5c1
text/template.(*state).evalArg(0xc423e717b0, 0x6914c0, 0xc4236c7200, 0x16, 0x0, 0x0, 0xa38d80, 0xc42020e5a0, 0x0, 0x0, ...)
	/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:727 +0x72b
text/template.(*state).evalChainNode(0xc423e717b0, 0x6914c0, 0xc4236c7200, 0x16, 0xc4211d8580, 0xc4201fd7b0, 0x1, 0x1, 0x0, 0x0, ...)
@bep bep added the Bug label Feb 17, 2017
@moorereason moorereason self-assigned this Feb 17, 2017
@moorereason
Copy link
Contributor

Should we show an error in the HTML output?

@bep
Copy link
Member Author

bep commented Feb 17, 2017

Should we show an error in the HTML output?

I guess the HTML output could be an empty string, but the most important part is that it should not take down the dev server, so:

  1. Log it as an ERROR with a useful error message (including page filename)
  2. Empty output (not sure about that, but I guess it is better than coming up with a pleasing error label)

@bep bep added this to the v0.19 milestone Feb 17, 2017
moorereason added a commit to moorereason/hugo that referenced this issue Feb 17, 2017
Instagram doesn't return a valid JSON response when the requested ID is
invalid or not found.

Fixes gohugoio#3048
@bep bep closed this as completed in #3049 Feb 17, 2017
bep pushed a commit that referenced this issue Feb 17, 2017
Instagram doesn't return a valid JSON response when the requested ID is
invalid or not found.

Fixes #3048
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants