Remove debugging print statement.

Also, have it return 500 instead of 400 when an error occurs.