Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
getAsset method does not match API documentation
Bill Klish
MediaBin 4.5.3
SQL Server 2000
We are writing a custom java application which uses the MB Web Services API. We had some unit tests fail calling getAsset on an id that has been deleted and removed from deleted items on the server. The method is throwing a RemoteException (Server was unable to process request. --> MBException: The requested asset is unavailable. (0x80040500)),
Page 195 of the 4.5.3 API guide states that the getAsset method return value is:
"An MBAsset object or null if asset does not exist or user does not have permissions."
Since it is not returning null, it will make things difficult for us to return the right message back to the user.
Is this fixed in 4.6.2?
Find more posts tagged with
Comments
msnider
Hi Bill,
Actually the docs are incorrect. The exception being thrown is coming directly from the MediaBin server and is the expected behavior. Wouldn't a try\catch allow you to inform the user of the error condition?
Mark
Bill Klish
Not necessarily unless we pared the text of the exception message coming back, which is not standard practice. A null would be better as it would indicate the asset does not exist. The exception should be thrown for things like the server being down, not having permission to view the object, etc.