It seems to be a correct usage here.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
messier42 We tried to run calibrations only to fail with an error.Did I use "only to" correctly?More or less correctly. The problem is that the main clause should set up a situation in which the result in the only to clause is unexpected. Is a failure really so very unexpected when you run calibrations? I would have said no, but then I don't