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

Cryptic error thrown when missing 'return' in verb method #286

Closed
byronferguson opened this Issue Jul 21, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@byronferguson

byronferguson commented Jul 21, 2015

{ "ERROR": "Element STATUSARGS.STATUSCODE is undefined in _TAFFYREQUEST.", "TAGCONTEXT": "C:\\ColdFusion11\\cfusion\\taffy\\core\\api.cfc [Line 343]", "DETAIL": "", "STACKTRACE": [ { "RAW_TRACE": "\tat cfapi2ecfc1594627821$funcONREQUEST.runFunction(C:\\ColdFusion11\\cfusion\\taffy\\core\\api.cfc:343)", "LINE": 343, "COLUMN": 0, "TEMPLATE": "C:\\ColdFusion11\\cfusion\\taffy\\core\\api.cfc", "ID": "CF_DOTRESOLVER", "TYPE": "CFML" } ] }

Returned from post() method:
function post() { rep(["New Student Created"]).withStatus(201, "Student Created"); }

post() missing the return keyword

@atuttle

This comment has been minimized.

Show comment
Hide comment
@atuttle

atuttle Jul 21, 2015

Owner

We should check this and make sure the resource is returning something. When it's not, we should throw something like "Your resource must return something, even if it's an empty response."

Owner

atuttle commented Jul 21, 2015

We should check this and make sure the resource is returning something. When it's not, we should throw something like "Your resource must return something, even if it's an empty response."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment