a 220Ω 2W resistor would be rated for use in about a 20VDC circuit, but for short durations it can be used in higher power and energy dissipation (e.g. rule of thumb from Dale, 5x for 5 seconds). The 400V is a lethal voltage level so that is a separate important concern.
So a typical 2W power resistor can survive a 10W pulse for 5 seconds, which is 50 Joules of energy. You didn't say what size capacitor, but you can calculate it's energy and compare, e.g. 47uF at 400V is about 4 Joules.
You may see a little spark but i doubt there will be molten metal, but wear safety glasses.