Instead of a singular "code" field, you may want to add a "diagnostics" field where developers can place various error metadata like a developer specific error message, firmware version, function, line number etc...
The whole field will be considered opaque to common user interactions... but you could perhaps encode it within an error report that you can then send back to engineering.