Swapped success and internal error codes.

Swapped success and internal error codes.