Removed asserts as they seem to be to hard and returned status code instead.