There is a chance, though I do not know what it is, that you will automatically regain everything you used if you fail the craft. The skill Reclaim bumps that chance up considerably, though not to 100% unfortunately. The base chance seems to be based inversely with recipe level though - at lower levels you have a greater chance of recovering the materials than at higher levels.