RT::Cl...ception(3pm)

πŸ’– RT::Client::REST::Exception πŸ’–

okay bestie, so this is the full tea on RT::Client::REST::Exception β€” a page from the User Contributed Perl Documentation manual set. it's the exception page, and it's lowkey important, so lock in 🫢

✨ NAME ✨

RT::Client::REST::Exception β€” Exceptions thrown by RT::Client::REST πŸ’…

🌸 VERSION 🌸

version 0.73 ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

These are the exceptions that get thrown by all the various RT::Client::REST methods. when something goes sideways, one of these bad boys is what you're catching. no cap. πŸ’€

πŸ‘‘ EXCEPTION HIERARCHY πŸ‘‘

here's the whole family tree, bestie. it's giving royal lineage:

  • RT::Client::REST::Exception β€” this exception is virtual, she is never thrown. she exists purely to group all the exceptions in this category together. iconique mother figure πŸ’–
    • RT::Client::REST::OddNumberOfArgumentsException β€” this means the method you called wants key-value pairs. like, pairs. two at a time. an odd number is giving chaos πŸ™ˆ
    • RT::Client::REST::InvalidObjectTypeException β€” thrown when you specify an invalid type to the show(), edit(), or search() methods. wrong type, bestie 😭
    • RT::Client::REST::RequiredAttributeUnsetException β€” an operation failed because a required attribute was not set in the object. you forgot to set the thing. it needed the thing. πŸ’€
    • RT::Client::REST::MalformedRTResponseException β€” the RT server sent a response that we cannot parse. this may very well mean there's a bug in this client, so if you get this exception, some debug info mailed to the author would be so appreciated πŸ₯Ί
    • RT::Client::REST::InvalidParameterValueException β€” invalid value for comments, link types, object IDs, etc. wrong value, no further questions ✨
    • RT::Client::REST::CannotReadAttachmentException β€” cannot read attachment. this one gets thrown from the methods comment() and correspond πŸ“Ž
    • RT::Client::REST::RTException β€” this is a virtual exception and she is never thrown. she groups together exceptions thrown because the RT server returns an error. another mother πŸ’…
      • RT::Client::REST::ObjectNotFoundException β€” one or more of the specified objects was not found. gone. ghosted. πŸ«₯
      • RT::Client::REST::AuthenticationFailureException β€” incorrect username or password. who are you even πŸ”
      • RT::Client::REST::UpdateException β€” this is a virtual exception. it groups exceptions thrown when the RT server returns an error while trying to update an object. grouping queen πŸ‘‘
        • RT::Client::REST::CouldNotSetAttributeException β€” for one or another reason, the attribute could not be updated with the new value. the why is a mystery, fr fr 🀷
        • RT::Client::REST::InvalidEmailAddressException β€” invalid e-mail address specified. that's not an email, babe πŸ“§
        • RT::Client::REST::AlreadyCurrentValueException β€” the attribute you're trying to update already has this value. I do not know why RT insists on treating this as an exception, but since it does so, so should the client. you can probably safely catch and throw away this exception in your code, bestie β€” it's harmless, just dramatic πŸŽ€
        • RT::Client::REST::ImmutableFieldException β€” you're trying to update an immutable field (such as last_updated, for example). it said no changing, and it meant it πŸ”’
        • RT::Client::REST::IllegalValueException β€” an illegal value for the attribute was specified. 🚫
      • RT::Client::REST::UnknownCustomFieldException β€” an unknown custom field was specified in the request. never heard of her 🌸
      • RT::Client::REST::InvalidQueryException β€” the server could not parse the search query. that query was not querying 😭
      • RT::Client::REST::UnauthorizedActionException β€” you are not authorized to perform this action. the audacity has been noted and declined πŸ’…
      • RT::Client::REST::AlreadyTicketOwnerException β€” the owner you're trying to assign to a ticket is already the owner. this exception is usually thrown by the methods take(), untake, and steal, if the operation is a noop. you did nothing and it noticed πŸ™ˆ
      • RT::Client::REST::RequestTimedOutException β€” request timed out. clocked out, literally ⏰
      • RT::Client::REST::UnknownRTException β€” some other RT exception that the driver cannot recognize. mystery flavour πŸ¦‹

πŸ’œ METHODS πŸ’œ

  • _get_exception_class β€” figure out the exception class based on the content returned by RT. detective work, main character energy πŸ”
  • _rt_content_to_exception β€” translate the error string returned by the RT server into an exception object, ready to be thrown. glow-up pipeline: string in, exception out ✨

🌈 SEE ALSO 🌈

Exception::Class, RT::Client::REST.

πŸ’– AUTHOR πŸ’–

Dean Hamstead <dean@fragfest.com.au>

This software is copyright (c) 2026, 2020 by Dmitri Tikhonov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page bestie!! 🫢 this one's from perl v5.40.1, dated 2026-04-21, and the manual it lives in is RT::Cl...ception(3pm) (the terminal just chopped the name, iconic of it). go forth and catch your exceptions, you got this πŸ‘‘πŸ’…βœ¨

πŸ“¦ where this page comes from