Link to the post displays ID instead of slug

What your explaining is the normal linking method for WordPress when you are linking to a post that has not yet been published. Based on your question I think that’s what occurred to you.

error code: 523