It's probably both. Since you want to obscure it from the end user, you can also afford to be lazy and have sloppy implementation.
After all if you have three API layers realizing in this situation the second layer isn't forwarding that error code because it erroneously thought it was one you hide behind a generic one is pretty common.