Fix some error codes for external api hanging