Help with JSON panel error

Hi there,

We’re testing out JSON panels and getting the “something went wrong” error, which suggests that the mapping we have and the JSON response might be off. However, I can’t spot anything that seems to be wrong - would love it if someone could take a look and point me in the right direction.

Here’s the mapping file:

{
	"type": "object",
	"required": [
		"id",
		"header"
	],
	"properties": {
		"id": {
			"$ref": "#/definitions/numerical"
		},
		"header": {
			"$ref": "#/definitions/header"
		},
		"project_link": {
			"$ref": "#/definitions/link",
			"label": "Project link"
		}
	}
}

And here’s the JSON response:
{ "id": 3, "project_link":"https://link.com.com", "header":"Hello"}

Hi @vlad.l
Welcome to the community :wave:
That’s a good point. Usually, this error is not shown directly in the panel. However, you can look at the reason for the error in the DevTools Network logs.

Your definition file is already good, and your response is not far from the right one. It should ideally be like this

{
  "data": {
    "id": 3,
    "header": "Hello",
    "project_link": "https://example.com"
  }
}

Thanks for your guidance @Hem! I updated the response to wrap the data in an object but still am getting the same error. And I’m trying to find the place in the DevTools Network logs but can’t seem to do so. Would appreciate any further help - whether it’s how I can fix the issue or how I can find the right spot in the logs to diagnose what might be going on.

Hi @Hem - could really use your help here. Thanks!

This topic was automatically closed after 10 days. New replies are no longer allowed.

Hi @vlad.l
Thanks for getting back. Can you share the HAR logs from the DevTools? I have DM’d you for further details :slight_smile: