The Labyrinth Above
"Spell slots do not represent how much magic you are able to memorize, they represent how much magic you can cast safely…"
There is an option for a spellcaster who has used all of their spell-slots for the day: They may attempt to draw power by sacrificing to the Edicts of Magic and chancing spectacular failure.
If invoking this option you may spend one of your Hit Dice, removing it from the pool, then roll it and add the level you are casting the spell at. You take the result as damage and then the DM will compare the result to a chart and tell you if it succeeds or fails and what other results there are beyond the spell and damage.
Similar rules apply on failed concentration checks.