NDSolve::bcuns
NDSolveValue::bcuns
ParametricNDSolve::bcuns
ParametricNDSolveValue::bcuns
An error is generated because one of the boundary conditions does not have a solution:
NDSolve[{Derivative[2, 0][f][x, t] == Derivative[0, 2][f][x, t], f[1, t] == 1 + f[1, t], f[2, t] == 2, f[x, 0] == x, Derivative[0, 1][f][x, 0] == 0}, f, {x, 1, 2}, {t, 0, 1}]
is an impossible boundary condition to satisfy, so you get an error. An example of a correct boundary condition specification is the following:
NDSolve[{Derivative[2, 0][f][x, t] == Derivative[0, 2][f][x, t], f[1, t] == 1, f[2, t] == 2, f[x, 0] == x, Derivative[0, 1][f][x, 0] == 0}, f, {x, 1, 2}, {t, 0, 1}]