better error 500 metadata patch