added missing dependency in JSON, without it if the app doesn't have request installed can't run
added missing dependency in JSON, without it if the app doesn't have request installed can't run
added an optional parameter on errorResponse that allows us to send different types off error codes back. If not provided the function behave exactly like before (transmits 500 error code)