Route not allowed on Custom Object

Hey Folks,

We are building an app that makes use of Custom Objects, when I tried a Custom Object record in Serverless I have been getting the following error { message: 'Route not allowed', status: 404 }.

My colleague tried the same code and the record got successfully created.

Entity Json

{
  "module": {
	"fields": [
		{
			"name": "moduleId",
			"type": "TEXT",
			"label": "",
			"required": true
		},
		{
			"name": "origin",
			"type": "TEXT",
			"label": "",
			"required": true,
			"filterable": true
		},
		{
			"name": "title",
			"type": "TEXT",
			"label": "",
			"required": true
		},
		{
			"name": "url",
			"type": "TEXT",
			"label": ""
		},
		{
			"name": "isActive",
			"type": "CHECKBOX",
			"label": ""
		},
		{
			"name": "allowedRating",
			"type": "NUMBER",
			"label": ""
		}
	]
  }
}

Create Record Snippet

const $entity = $db.entity({ version: "v1" })

const modules = $entity.get("module")

modules
	.create({
		moduleId: "UCZzOVoi2nhio8Cttxq10XSg",
		origin: "parent#type",
		title: "Module Title",
		url: "https://example.com",
		isActive: true
	})
	.then(
		(data) => console.log("Entity Stored Successfully---> ", data),
		(err) => console.log("Entity Storage Failed---> ", err)
	)

FDK Version

Installed: 6.11.0
Latest: 6.11.1

Note: We have faced the Route not allowed a few times so far on $db, $schedule & $request methods. I think this is an issue with the FDK package. I have raised topics on the same previously.

2 Likes

Hi Arshath,

Were you able to follow the steps in this post and still facing the issue?

As you have mentioned, it has occurred before and sometimes it is an issue in the environment and other times it was a bug introduced in the FDK. If it works fine for your colleague with the same FDK version, then it’s not a bug.

But, we can definitely check on our end in the meantime if there’s an issue with FDK. Your environment details would help quickly check that.

2 Likes

Adding on to @Raviraj - Pl. do send us the FDK debug logs if you still face Route not allowed issues with FDK @arshath.h

1 Like

@Raviraj & @Hem

Thanks for your help. The error was thrown due to the iparams not being entered. I entered iparam values on the installation page and tried creating a record. It worked perfectly.

My suggestion is to give a proper error message in these cases which would really help us find the issue. Route not allowed is not descriptive on its own.

5 Likes