error testing api handler

This commit is contained in:
Paul Liverman III 2018-04-24 07:03:38 -07:00
parent 78f27e5835
commit 0753a17796

View File

@ -23,6 +23,9 @@ class API extends Application
handle_error: (err, trace) => handle_error: (err, trace) =>
return status: 500, json: { errors: {err}, :trace } -- NOTE trace should be saved and NOT returned to the user return status: 500, json: { errors: {err}, :trace } -- NOTE trace should be saved and NOT returned to the user
[err_test: "/err"]: =>
error!
[new: "/new"]: capture_errors_json json_params => [new: "/new"]: capture_errors_json json_params =>
assert_valid @params, { assert_valid @params, {
{"content", exists: true, min_length: 1, "Task content not specified."} {"content", exists: true, min_length: 1, "Task content not specified."}