Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Panic with POST /ob/listing #428

Open
JustinDrake opened this issue Mar 8, 2017 · 1 comment
Open

Panic with POST /ob/listing #428

JustinDrake opened this issue Mar 8, 2017 · 1 comment
Assignees
Labels

Comments

@JustinDrake
Copy link
Contributor

POST /ob/listing {} will panic:

13:07:11.565 [func1] [ERROR] A panic occurred in the rest api handler!
13:07:11.565 [func1] [ERROR] runtime error: invalid memory address or nil pointer dereference
goroutine 2450 [running]:
runtime/debug.Stack(0x42d874b, 0xc4202745d0, 0x1)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
runtime/debug.PrintStack()
	/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/OpenBazaar/openbazaar-go/api.(*jsonAPIHandler).ServeHTTP.func1()
	/Users/justin/go/src/github.com/OpenBazaar/openbazaar-go/api/jsonapi.go:129 +0x150
panic(0x4c7e6c0, 0xc42000e0a0)
	/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/OpenBazaar/openbazaar-go/api.(*jsonAPIHandler).POSTListing(0xc420094960, 0x558a680, 0xc421802410, 0xc420d4a960)
	/Users/justin/go/src/github.com/OpenBazaar/openbazaar-go/api/jsonapi.go:458 +0x110
github.com/OpenBazaar/openbazaar-go/api.post(0xc420094960, 0xc4217c54f0, 0xb, 0x558a680, 0xc421802410, 0xc420d4a960)
	/Users/justin/go/src/github.com/OpenBazaar/openbazaar-go/api/endpoints.go:26 +0xc96
github.com/OpenBazaar/openbazaar-go/api.(*jsonAPIHandler).ServeHTTP(0xc420094960, 0x558a680, 0xc421802410, 0xc420d4a960)
	/Users/justin/go/src/github.com/OpenBazaar/openbazaar-go/api/jsonapi.go:142 +0x8e8
net/http.(*ServeMux).ServeHTTP(0xc420a11b30, 0x558a680, 0xc421802410, 0xc420d4a960)
	/usr/local/go/src/net/http/server.go:2022 +0x7f
net/http.serverHandler.ServeHTTP(0xc420263a80, 0x558a680, 0xc421802410, 0xc420d4a960)
	/usr/local/go/src/net/http/server.go:2202 +0x7d
net/http.(*conn).serve(0xc420a26500, 0x558b680, 0xc420411600)
	/usr/local/go/src/net/http/server.go:1579 +0x4b7
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2293 +0x44d
@hoffmabc
Copy link
Member

still occurring.

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

No branches or pull requests

4 participants