Event log at tfs application tier said:
Exception Message: The given key was not present in the dictionary. (type KeyNotFoundException)
Exception Stack Trace: at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.TeamFoundation.Server.WebAccess.Agile.Models.WorkItemSource.<>c__DisplayClassa.<GetCompleteWorkItemData>b__6(IDataRecord dataRecord)
at Microsoft.TeamFoundation.Server.WebAccess.Agile.Utility.WorkItemServiceUtils.<GetWorkItems>d__c.MoveNext()...
...etc ..etc
As this is a known issue, solution is described here:
http://blogs.msdn.com/b/visualstudioalm/archive/2013/03/19/how-to-fix-tf400898-an-internal-error-occurred-on-your-kanban-board-in-tfs-2012-update-2.aspx
But... it didn't help. Yes, there was inconsistency and 2 possible work items states mapped to Complete board state, but after fixing CommonProcessConfig.xml and leaving only User Story work item in Requirements categories - error still kept coming.
It looks like if there are work items which have the "invalid" state, the board is not getting rebuilt. So, in this unlucky case the fastest fix is to create a new area, and make it the only and default area for backlog.Which practically makes the backlog (and the board) empty.
So, this time the board gets rebuilt successfully. Go to the board page and verify it. After that, just set default area(s) for the backlog the way it was before. Most likely you will need to correct columns for the board, but the annoying TF400898 will be gone.
Just click on Correct this now, and assign relevant states for the board columns.
Neat!