[Koha-bugs] [Bug 29322] Date validation can be sketchy on the API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 18 11:11:14 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29322

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com

--- Comment #1 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
The current situation on master is:

PUT http://kohadev-intra.mydnsname.org:8081/api/v1/holds/1
    {
        "pickup_library_id": "FPL",
        "priority": 1,
        "suspended_until": "2021-10-27 23:59"
    }

=> 
  "message": "Does not match date-time format.",
  "path": "/body/suspended_until"

PUT http://kohadev-intra.mydnsname.org:8081/api/v1/holds/1
    {
        "pickup_library_id": "FPL",
        "priority": 1,
        "suspended_until": "2021-10-27 23:59:00"
    }

=>     "error": "Something went wrong, check Koha logs for details."

With, in logs:
[2021/11/18 10:10:47] [ERROR] PUT /api/v1/holds/1: unhandled exception
(Mojo::Exception)<<The given date (2021-10-27 23:59:00) does not match the date
format (rfc3339) at /kohadevbox/koha/Koha/DateUtils.pm line 193.>>
Koha::REST::Plugin::Exceptions::__ANON__
/kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list