error testing api handler
This commit is contained in:
parent
78f27e5835
commit
0753a17796
@ -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."}
|
||||||
|
Loading…
Reference in New Issue
Block a user