Facepalm: Imagine being promoted and finding out that you're going to receive considerable compensation, only for the company to inform you that, due to a software error, the new package isn't as generous as expected. It's a situation faced by around 40% of Amazon corporate employees who were promoted in the current quarter.

Amazon has confirmed the error in an email sent to managers seen by Insider. The issue was due to a one-time bonus for newly promoted staff being calculated using older Amazon share prices that were higher than their current value.

How many staff will now be buying something cheaper with their bonus is unknown, though an internal trouble ticket states that around 40% of those promoted in the quarter have been impacted by the issue.

"We identified and immediately corrected an issue with some newly promoted employees' compensation communications," an Amazon spokesperson told Fortune. "We are working with employees to ensure they understand their updated compensation."

Amazon's share price was above $170 at the start of the year. Like most large tech firms, it has crashed over the last nine months and is now at $113. Insider writes that one Amazon employee pointed this out in an internal Slack group last week, noting that the "stock continues to tank every day" and that Amazon was "taking away something that somewhat made us whole."

The email to managers states that "it is likely that the promotional cash value your employee will now receive is lower than you originally discussed with them." It adds that informing the newly promoted staff of why they won't be getting what they expected will be a "difficult" conversation, which is probably an understatement.

There's a lot of competition for corporate workers in the tech sector. As it attempted to hold on to its staff and attract new hires, Amazon increased the maximum base salary it pays employees to $350,000 from $160,000 in January.

Amazon's warehouse workers are unlikely to feel sympathy for the corporate staff who aren't getting as much money as they expected. CEO Andy Jassy last month laughed at the idea of the former group being paid $25 per hour, claiming Amazon wouldn't be able to afford it and the company needs to run a sustainable business. He also said that there are no plans to return corporate staff to the office.