SR075

Severity: error

Summary: non-convention endpoint has no handler declared

What this means

An endpoint with a custom action name (not one of list, get, create, update, delete) has no handler: declared. Convention endpoints have their handlers auto-generated; custom endpoints require an explicit handler: pointing to a function in the resource’s controller file.

Example that triggers this

endpoints:
  archive:
    method: POST
    path: /items/:id/archive
    auth: [admin]

How to fix it

Add a handler: <function_name> field to the endpoint:

archive:
  method: POST
  path: /items/:id/archive
  auth: [admin]
  handler: archive_item

Back to top

Shaperail documentation lives in the same repository as the framework so every release has versioned instructions. See the latest release for the most recent version.

This site uses Just the Docs, a documentation theme for Jekyll.