Improved error handling: actually send the correct error instead of always a 302.