Span errors set by the server seems to be overridden in method HttpServerDecorator.onResponseStatus(), which set the span error configuration base solely on the DD_HTTP_SERVER_ERROR_STATUSES property.
I believe considering the previous span error value in the setError logic should keep changes made to the span at the server.
if (!span.isError && !BlockingException.class.getName().equals(span.getTag("error.type"))) {
span.setError(SERVER_ERROR_STATUSES.get(status));
}
Or rollback to something like version 1.12.1 implementation:
if (!BlockingException.class.getName().equals(span.getTag("error.type")) && SERVER_ERROR_STATUSES.get(status)) {
span.setError(true);
}