ietf-ribose / bibxml-service

Django-based Web service implementing IETF BibXML APIs
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Improve system messages: Info, Errors #19

Open raaaskol opened 1 year ago

raaaskol commented 1 year ago

Description

The goal of task is to unify and improve (make it clear for users) system messages. Now there are 2 kinds of messages: Info – to show information about search results or processes (ex: redirecting, using other categories) Errors – for the cases when system crashes, serious problems

Try incorrect query for Quick Search

  1. Add quick search query (ex: text not query)
  2. Search

Сurrent text (Info, 2 messages):

Could not find a bibliographic item exactly matching given document identifier (err: Not found in indexed sources by docid), trying search instead. No search method was given; treating the query as “web search”.

New text (Info, 1 message)

Could not find a bibliographic item with this document identifier. Tried Advanced search with {method_name} method for query.

Advanced search with incorrect method

  1. Add advanced search request (ex: text not query)
  2. Choose incorrect method for request (docid)

Current text (Error)

No bibliographic items were found matching the query. You may retry the same query trying all available search methods.

New text (Info)

Could not find bibliographic items matching the query. Please use Quick search or try another search method or query.

Incorrect DOI

  1. Add incorrect DOI search request (ex: RFC 1845)
  2. Search

Current text (Error)

Couldn’t retrieve citation: Item not found

New text (Info)

Could not find a bibliographic item with this document identifier. Please use Quick search or try another search method or query

Quick search without search request

  1. Try Quick search
  2. Search field is empty

Current text (Info)

Query was not provided.

New text (Info)

Query wasn’t provided. Please add document ID and try again.

Advanced search without search request

  1. Try Advanced search
  2. Search field is empty

Current text (Info)

No bibliographic items were found matching the query. You may retry the same query trying all available search methods.

New text (Info)

Query wasn’t provided. Please add a search query, choose a method and try again.

DOI search without search request

  1. Try DOI search
  2. Search field is empty

Current text (Error)

Did not receive a reference for external lookup

New text (Info)

Query wasn’t provided. Please add DOI and try again.

Send search query via Enter button

  1. Leave all search fields empty or Add Advanced/DOI query
  2. Press Enter

Current text (Info)

Query was not provided.

New text (Info)

Query wasn’t provided. Please add document ID and try again.

Search DOI via Quick search

  1. Add DOI to Quick search field (DOI.10.1145/2975159)
  2. Search

Current text (Info)

Could not find a bibliographic item exactly matching given document identifier (err: Not found in indexed sources by docid), trying search instead.

New text (Info)

Could not find a bibliographic item with this document identifier. Please try another search method or query

Search DOI via Advanced search

  1. Add DOI to Advanced search field (DOI.10.1145/2975159)
  2. Search

Current text (Info)

No bibliographic items were found matching the query.

New text (Info)

Could not find bibliographic items matching your/this query. Please try another search method or Quick search.

Try incorrect query for Quick Search without any results

  1. Add incorrect Quick search query (ex: kjkkkkkdjfkldnhjfddagefsdx)
  2. Search

Current text (Info)

No bibliographic items were found matching the query. You may retry the same query trying all available search methods.

New text (Info)

Could not find bibliographic items matching the query. Please try another search method or query or use Quick search.

Search with incorrect JSON path syntax

  1. Add advanced search request (ex: RFT 198)
  2. Select JSON path like method

Current text (Error)

Query may have used incorrect syntax.
You may retry the same query trying all available search methods.

New text

Query may have used incorrect syntax. (Info) Please check the query or try another search method.

Search with incorrect JSON container

  1. Add advanced search request (ex: RFT 198)
  2. Select JSON container like method

Current text (Info)

Unable to parse search query.

New text (Info)

Query may have used incorrect syntax. Please check the query or try another search method.

Use Error type for technical problems (ex. system was crushed because of problems with users internet connection, 404 etc)

Code of Conduct

strogonoff commented 1 year ago

Thanks!

strogonoff commented 1 year ago

Сurrent text (Info, 2 messages): Could not find a bibliographic item exactly matching given document identifier (err: Not found in indexed sources by docid), trying search instead. No search method was given; treating the query as “web search”.

New text (Info, 1 message) Could not find a bibliographic item with this document identifier. Tried Advanced search with {method_name} method for query.

It is a bit of a challenge to unify two messages into one, since each message is queued in a different view (1, 2) during redirect flow:

  1. Quick search view tries to show an exact document by ID, which fails, so it queues a message about redirecting to advanced search.
  2. Advanced search view is invoked without a search method, and queues a message about that.

I can see some ways this can be improved though…

ronaldtse commented 1 year ago

Thank you @raaaskol ! I reformatted the issue for better readability.