I think I read it five or six years ago from a collection of novels written by one writer. A man is a spy in a secret illegal organization, one day he took part in a secret party, but he had been betrayed by his colleague and been caught. The boss of the organization went to his house for some secret files but he got into a trap and stuck in a room behind a wall. The door was specially designed and it would be closed if there was no pressure. I don't remember the end of the story but I am sure it's short and is in the end of the collection book. I think it like a easy story because I was only 11 at that time.
I think this is "The Cave of Ali Baba" or "The Adventurous Exploit of the Cave of Ali Baba", by Dorothy L. Sayers. It was a bit longer than an average short story IIRC - maybe a "novelette" or "novella", and was the final story in the collection "Lord Peter Views the Body"
A man is a spy in a secret illegal organization
Lord Peter Wimsey fakes his death, disguises himself as a disgruntled ex-footman, lives in this role for about a year, and is eventually recruited by a criminal organisation. I don't know if he made contact with them or the other way round. He claimed to have insider information that would help them rob Wimsey's family.
one day he took part in a secret party,but he had been be betrayed by his colleague and been caught.
He did attend a secret party at which all the organisation's members were present. They were all identified by numbers, not names - a bit like the Prisoner. He was unmasked by Number One - but I don't think he was betrayed, I think it was just that the villain had deduced his true identity.
The boss of the organization went to his house for some secret files but he got into a trap and stuck in a room behind a wall. The door was specially designed and it would be closed if there was no pressure.
Number One did indeed go to Wimsey's home to retrieve something from a secret cupboard. There was a complicated setup with an outer door, an outer-inner door, and an inner door. This sprung a trap and left Number One trapped in the room, possibly running out of oxygen. Wimsey had (seemingly under duress) revealed the existence of the "outer-inner door" so that, on seeing it, Number One would think he'd found the trap, and be too careless to notice the "inner-inner door".
The story was great fun, really funny. In my opinion, it was like a cross between a standard Wimsey short and an episode of 60s Batman!