handle server errors (5xx)

I hope this will be the right one