"Or it could have been that I might have not paid attention to little details which I thought were not important"
I think you are underestimating the importance of this. I have hired people before and this is a critical thing I look for. Attention to detail is very important as a developer, if you don't showcase it while on your best behaviour during an interview, I would be concerned what you are like day to day.
I think as a general rule you can assume every detail is important in an interview test.
It irks me that people think that being able to pay attention to detail in a stressful job interview while standing in front of a whiteboard has any strong correlation with their ability and desire to pay attention to detail while doing real-world programming. If this were true, wouldn't MIT and Stanford and CMU grade you while you code at a whiteboard, instead of grading you on significant programming projects?
Where I work, we give people a do-at-home programming assignment before having them come in for an interview. We then all code review the solution submitted. This seems to me a much more realistic gauge of a programmer's real-world abilities. Also, it clearly demonstrates that most people looking for jobs apparently can't program their way out of a paper bag.
I am not necessarily advocating the whiteboard, but am advocating attention to detail no matter what the situation is. I agree the whiteboard can be stressful, but so can a server outage and needing to get a fix out quickly. I don't want a programmer that generally has good attention to detail unless they are under pressure... under pressure is when you need it most.
The idea that every programmer should be able to write runnable programs under extreme stress without any errors is ludicrous. That has nothing to do with "attention to detail". It's like professors who give you a failing grade for making a single sign error in the middle of a complicated three page Laplace transform that is otherwise correct. What they really want is to just humiliate you for the power trip.
The "server outage" scenario is a red herring. The vast majority of programmers don't have to fix server outages under pressure that is anything like that at a job interview. Also, you might try hiring programmers instead who write reliable software to begin with. I've written server software, for instance, that has been running continuously for the last dozen years without ever being touched by a human being since. I was also a sysadmin for a seven years, and had to deal with various emergencies all the time. Never was the pressure anything like trying to code at an interview, and the systems I designed and maintained worked great.
I think you are underestimating the importance of this. I have hired people before and this is a critical thing I look for. Attention to detail is very important as a developer, if you don't showcase it while on your best behaviour during an interview, I would be concerned what you are like day to day.
I think as a general rule you can assume every detail is important in an interview test.