Closed f4iha closed 1 year ago
Describe the bug Import of a QSO with an incorrect station callsign is providing a 201 instead of an error with the associated error message.
To Reproduce
curl -X POST -d '{"key":"REDACTED","station_profile_id":"3","type":"adif","string":"<call:5>F4AAA <gridsquare:4>JN20 <mode:3>FT8 <rst_sent:0> <rst_rcvd:0> <qso_date:8>20230904 <time_on:6>224345 <qso_date_off:8>20230904 <time_off:6>224345 <band:0> <freq:8>0.000857 <station_callsign:7>F4IHA/P <my_gridsquare:6>JN26 <tx_pwr:2>3W <comment:3>FT8<eor>"}' http://my_server/index.php/api/qso {"status":"created","type":"adif","string":"<call:5>F4AAA <gridsquare:4>JN20 <mode:3>FT8 <rst_sent:0> <rst_rcvd:0> <qso_date:8>20230904 <time_on:6>224345 <qso_date_off:8>20230904 <time_off:6>224345 <band:0> <freq:8>0.000857 <station_callsign:7>F4IHA\/P <my_gridsquare:6>JN26 <tx_pwr:2>3W <comment:3>FT8<eor>"}
Expected behaviour Having the error message which is displayed as output of the API
Additional context The issue is when the import function in the Logbook_model.php is making a return but the message is not handled in the API return
Fix proposed in https://github.com/magicbug/Cloudlog/pull/2465. Please test and report.
Describe the bug Import of a QSO with an incorrect station callsign is providing a 201 instead of an error with the associated error message.
To Reproduce
Expected behaviour Having the error message which is displayed as output of the API
Additional context The issue is when the import function in the Logbook_model.php is making a return but the message is not handled in the API return