What is the hydraulic brakes expected life?
Shimano warrants to the original retail purchaser that the Shimano bicycle division product for which they received this warranty, is free from non-conformities in material and workmanship for a period of two years (...)


As you can read in Shimano's North America homepage. So if you bought this new, go there and complain.

Disc brakes with proper maintenance should last for a few good years even on an daily usage basis, and Shimano's are known for their reliability.

If you bought them used or did something you shouldn't (incorrect oil for ex), you can try to get them fixed, but since they're around $35 each, lever and caliper, I'de just buy new ones.