changed error reporting type

and fixed a test for flex entitlements