Notifiarr / website

Issue tracker for Notifiarr.com
https://notifiarr.com
6 stars 0 forks source link

check Readarr Book Add API - \u0027Foreign Book Id\u0027 must not be empty. #143

Closed notifiarr-bot closed 2 years ago

notifiarr-bot commented 2 years ago
[DEBUG] 2022/05/25 14:13:06 Sent (POST) 550 bytes to http://192.168.1.118:8787/api/v1/book: {"monitored":true,"tags":[5],"addOptions":{"searchForNewBook":true},"author":{"monitored":false,"qualityProfileId":1,"metadataProfileId":1,"foreignAuthorId":"","rootFolderPath":"/data/media/books/ebooks/","addOptions":{"searchForMissingBooks":false,"monitored":false,"monitor":"all","booksToMonitor":null}},"editions":[{"title":"","titleSlug":"18337259","images":[{"coverType":"poster","url":"http://dev.notifiarr.com/images/logo_100x100.png","extension":".png"}],"foreignEditionId":"18337259","monitored":true,"manualAdd":true}],"foreignBookId":""}

 Response: Bad Request
Content-Type: application/json
Date: Wed, 25 May 2022 12:13:06 GMT
Server: Kestrel
Cache-Control: no-cache,no-store
Expires: -1
Pragma: no-cache
[
  {
    "propertyName": "ForeignBookId",
    "errorMessage": "\u0027Foreign Book Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Foreign Book Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  },
  {
    "propertyName": "Author.ForeignAuthorId",
    "errorMessage": "\u0027Author. Foreign Author Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Author. Foreign Author Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  }
] (err: failed:  (status: 400 Bad Request): invalid status code, <200||>299: [
  {
    "propertyName": "ForeignBookId",
    "errorMessage": "\u0027Foreign Book Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Foreign Book Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  },
  {
    "propertyName": "Author.ForeignAuthorId",
    "errorMessage": "\u0027Author. Foreign Author Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Author. Foreign Author Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  }
])
[DEBUG] 2022/05/25 14:13:06 Incoming API: POST /api/readarr/1/add: {"foreignBookId":null,"monitored":true,"addOptions":{"searchForNewBook":true},"author":{"rootFolderPath":"\/data\/media\/books\/ebooks\/","qualityProfileId":1,"metadataProfileId":1,"foreignAuthorId":null,"monitored":false,"addOptions":{"monitor":"all","monitored":false}},"editions":[{"foreignEditionId":"18337259","title":null,"titleSlug":"18337259","images":[{"url":"http:\/\/dev.notifiarr.com\/images\/logo_100x100.png","coverType":"poster","extension":".png"}],"monitored":true,"manualAdd":true}],"tags":[5]}
Status: 500, Reply: {}
[ERROR] 2022/05/25 14:13:06 Request failed. Status: 500: Internal Server Error, Message: adding book: api.Post(book): failed:  (status: 400 Bad Request): invalid status code, <200||>299: [
  {
    "propertyName": "ForeignBookId",
    "errorMessage": "\u0027Foreign Book Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Foreign Book Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  },
  {
    "propertyName": "Author.ForeignAuthorId",
    "errorMessage": "\u0027Author. Foreign Author Id\u0027 must not be empty.",
    "attemptedValue": "",
    "severity": "error",
    "errorCode": "NotEmptyValidator",
    "formattedMessageArguments": [],
    "formattedMessagePlaceholderValues": {
      "propertyName": "Author. Foreign Author Id",
      "propertyValue": ""
    },
    "resourceName": "NotEmptyValidator"
  }
]

Origin user: smaster Origin message: Discord Server Link Reporting user: bakerboy448 Reporting message: Discord Server Link

bakerboy448 commented 2 years ago

Readarr version: 0.1.1.1323 (nightly)Notifiarr client version: 0.3.1.530

davidnewhall commented 2 years ago

The website is sending a book without a foreign book id. Readarr is rejecting it. Client just relays the message.

austinwbest commented 2 years ago

The website is sending a book without a foreign book id. Readarr is rejecting it. Client just relays the message.

Yea, i mentioned it was likely a me thing. It can be moved to the website repo instead

austinwbest commented 2 years ago

I was able to add one just a few minutes ago fixing a different issue. It may or may not be related but either way i cant reproduce it currently

Client: 0.3.1.766 Readarr: 0.1.1.1383