Revert "Removed unused import.g"

This reverts commit 337478bdfa98f45b12079b6e2881e0cdf6b6fbd7.
"Revert "Removed unnecessary 400 response status code."

This reverts commit dd2f35ecdee159084f6bccc8ccfa9a71921dabc1.
Fixing mux to return error response with proper http status code.