The 4er codes are for client errors (something is wrong with the request). This is rather a server error so should be a 500.