I am currently writing some code that wraps common Spring web exceptions.

I came across both MediaTypeNotSupportedStatusException and UnsupportedMediaTypeStatusException. They seem very similar, yet the former is never instantiated in any of Spring's code. Are they supposed to convey different exception semantics?

Anyway, it seems like this class was accidentally missed during a refactoring, or something. It feels like it could be removed.

Comment From: jhoeller

@rstoyanchev I suppose this is indeed a leftover from a refactoring since UnsupportedMediaTypeStatusException has been further evolved, and MediaTypeNotSupportedStatusException is completely unused. If you agree, I'll mark the latter as deprecated, also across the backport releases, and we can then remove it along with some other deprecated stuff in 5.3.

Comment From: rstoyanchev

Looks like it was never used, added in error.