add error param to JSON responses
add log statement
add log statement
remove logs
add error codes